10 lines
345 B
Lua
10 lines
345 B
Lua
minetest.register_on_respawnplayer(function(player)
|
|
local name = player:get_player_name()
|
|
minetest.log("action", "respawn_patch: " .. name .. ", get_hp(): " .. player:get_hp())
|
|
|
|
if player:get_hp() < 1 then
|
|
player:set_hp(20)
|
|
minetest.log("action", "respawn_patch: " .. name .. " restoration of life")
|
|
end
|
|
end)
|