forked from MineClone5/MineClone5
Add death message if player killed by lightning
This commit is contained in:
parent
40d22d2173
commit
6a9a00b387
|
@ -1 +1,2 @@
|
||||||
mcl_fire
|
mcl_fire
|
||||||
|
mcl_death_messages?
|
||||||
|
|
|
@ -177,6 +177,9 @@ lightning.strike = function(pos)
|
||||||
local lua = obj:get_luaentity()
|
local lua = obj:get_luaentity()
|
||||||
if obj:is_player() then
|
if obj:is_player() then
|
||||||
-- Player damage
|
-- 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)
|
obj:set_hp(obj:get_hp()-5)
|
||||||
-- Mobs
|
-- Mobs
|
||||||
elseif lua and lua._cmi_is_mob then
|
elseif lua and lua._cmi_is_mob then
|
||||||
|
|
Loading…
Reference in New Issue