nodecore-cd2025/mods/nc_player_setup/step_invulnbreath.lua

15 lines
455 B
Lua
Raw Normal View History

2020-06-22 22:46:48 -04:00
-- LUALOCALS < ---------------------------------------------------------
local nodecore
= nodecore
-- LUALOCALS > ---------------------------------------------------------
nodecore.register_playerstep({
label = "invulnerable breath",
action = function(player, data)
if (not nodecore.player_can_take_damage(player))
and player:get_breath() < data.properties.breath_max then
player:set_breath(data.properties.breath_max)
end
end
})