forked from MineClone5/MineClone5
Code style for #1890
This commit is contained in:
parent
bca5033fb2
commit
0564121183
|
@ -134,9 +134,6 @@ minetest.register_on_player_hpchange(function(player, hp_change)
|
|||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
local food_tick_timers = {} -- one food_tick_timer per player, keys are the player-objects
|
||||
minetest.register_globalstep(function(dtime)
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
|
@ -158,7 +155,9 @@ minetest.register_globalstep(function(dtime)
|
|||
end
|
||||
|
||||
elseif food_level == 0 then -- starvation
|
||||
local maximum_starvation = 1 --the amount of health at which a player will stop to get harmed by starvation (10 for Easy, 1 for Normal, 0 for Hard)
|
||||
-- the amount of health at which a player will stop to get
|
||||
-- harmed by starvation (10 for Easy, 1 for Normal, 0 for Hard)
|
||||
local maximum_starvation = 1
|
||||
-- TODO: implement Minecraft-like difficulty modes and the update maximumStarvation here
|
||||
if player_health > maximum_starvation then
|
||||
mcl_util.deal_damage(player, 1, {type = "starve"})
|
||||
|
|
Loading…
Reference in New Issue