0
0
Fork 0

Add death message if player killed by lightning

This commit is contained in:
Wuzzy 2017-12-12 23:53:54 +01:00
parent 40d22d2173
commit 6a9a00b387
2 changed files with 4 additions and 0 deletions

View File

@ -1 +1,2 @@
mcl_fire
mcl_death_messages?

View File

@ -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