1
0
Fork 0

Code style for #1890

This commit is contained in:
iliekprogrammar 2021-11-12 02:28:27 +08:00
parent bca5033fb2
commit 0564121183
No known key found for this signature in database
GPG Key ID: 8E7B20514DBCFBFA
1 changed files with 14 additions and 15 deletions

View File

@ -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"})