diff --git a/mods/ENVIRONMENT/lightning/depends.txt b/mods/ENVIRONMENT/lightning/depends.txt index 47738767fb..356c2f185a 100644 --- a/mods/ENVIRONMENT/lightning/depends.txt +++ b/mods/ENVIRONMENT/lightning/depends.txt @@ -1 +1,2 @@ mcl_fire +mcl_death_messages? diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index d1e751957f..0f3061e43c 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -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