add sunprotection with 3d_armor

master
A. Demant 2018-09-11 05:34:09 +02:00
parent 348acae3c4
commit d7560c6245
3 changed files with 14 additions and 0 deletions

View File

@ -1,2 +1,3 @@
hud?
hudbars?
3d_armor?

View File

@ -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]

View File

@ -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,
}