mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
Add death message if player killed by lightning
This commit is contained in:
parent
40d22d2173
commit
6a9a00b387
2 changed files with 4 additions and 0 deletions
|
@ -1 +1,2 @@
|
|||
mcl_fire
|
||||
mcl_death_messages?
|
||||
|
|
|
@ -177,6 +177,9 @@ lightning.strike = function(pos)
|
|||
local lua = obj:get_luaentity()
|
||||
if obj:is_player() then
|
||||
-- Player damage
|
||||
if minetest.get_modpath("mcl_death_messages") then
|
||||
mcl_death_messages.player_damage(obj, string.format("%s was struck by lightning.", obj:get_player_name()))
|
||||
end
|
||||
obj:set_hp(obj:get_hp()-5)
|
||||
-- Mobs
|
||||
elseif lua and lua._cmi_is_mob then
|
||||
|
|
Loading…
Reference in a new issue