add sunprotection with 3d_armor
parent
348acae3c4
commit
d7560c6245
|
@ -1,2 +1,3 @@
|
|||
hud?
|
||||
hudbars?
|
||||
3d_armor?
|
||||
|
|
8
init.lua
8
init.lua
|
@ -102,6 +102,14 @@ minetest.register_globalstep(function(dtime)
|
|||
-- dead players don't fear the sun
|
||||
break
|
||||
end
|
||||
|
||||
if (armor.def) then
|
||||
-- protected players
|
||||
if (armor.def[player:get_player_name()].count >= C.min_armor_items) then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local name = player:get_player_name()
|
||||
local pl = M.players[name]
|
||||
|
|
|
@ -68,4 +68,9 @@ sunburn.config = {
|
|||
]]
|
||||
|
||||
sunburn_threshold = 0,
|
||||
|
||||
--[[ protection against sunburn with 3D armor. At least how many
|
||||
items are needed for no sunburn
|
||||
]]
|
||||
min_armor_items = 1,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue