diff --git a/mods/pvp/medkits/init.lua b/mods/pvp/medkits/init.lua index c3c874c..92ee651 100644 --- a/mods/pvp/medkits/init.lua +++ b/mods/pvp/medkits/init.lua @@ -47,17 +47,17 @@ local function start_healing(stack, player) end --- Interrupt reason can be: --- damage: get damage from another player --- move: move more then 1m --- die: die because any reason +-- Interrupt reasons: +-- attack: Attacked another player +-- move: Moved 1m away from initial healing pos +-- damage: Damaged by another player local function reason_handler(reason) - if reason == "damage" then - return " because someone damaged you!" + if reason == "attack" then + return " because you attacked other player!" elseif reason == "move" then return " because you moved!" - elseif reason == "die" then - return " because you died!" + elseif reason == "damage" then + return " because someone damaged you!" else return "!" end @@ -132,12 +132,12 @@ end) minetest.register_on_player_hpchange(function(player, hp, reason) if hp < 0 then if players[player:get_player_name()] then - stop_healing(player, "die") + stop_healing(player, "damage") end if reason and reason.type == "punch" then local hitter = reason.object if hitter and players[hitter:get_player_name()] then - stop_healing(hitter, "damage") + stop_healing(hitter, "attack") end end end