mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-29 22:50:29 +02:00
Removed whitespaces
This commit is contained in:
@ -18,7 +18,7 @@ end
|
||||
|
||||
function hud.set_armor(player_name, ges_state, items)
|
||||
local max_items = 4
|
||||
if items == 5 then
|
||||
if items == 5 then
|
||||
max_items = items
|
||||
end
|
||||
local max = max_items * 65535
|
||||
|
@ -17,7 +17,7 @@ local function poisenp(tick, time, time_left, player)
|
||||
if player:get_hp()-1 > 0 then
|
||||
player:set_hp(player:get_hp()-1)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
function hud.item_eat(hunger_change, replace_with_item, poisen, heal)
|
||||
@ -301,7 +301,7 @@ if minetest.get_modpath("mobs") ~= nil then
|
||||
overwrite("mobs:chicken_cooked", 4)
|
||||
overwrite("mobs:egg", 1)
|
||||
overwrite("mobs:chicken_egg_fried", 2)
|
||||
if minetest.get_modpath("bucket") then
|
||||
if minetest.get_modpath("bucket") then
|
||||
overwrite("mobs:bucket_milk", 3, "bucket:bucket_empty")
|
||||
end
|
||||
end
|
||||
|
@ -49,7 +49,7 @@ HUD_TICK = 0.1
|
||||
--Some hunger settings
|
||||
hud.exhaustion = {} -- Exhaustion is experimental!
|
||||
|
||||
HUD_HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken
|
||||
HUD_HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken
|
||||
HUD_HUNGER_EXHAUST_DIG = 3 -- exhaustion increased this value after digged node
|
||||
HUD_HUNGER_EXHAUST_PLACE = 1 -- exhaustion increased this value after placed
|
||||
HUD_HUNGER_EXHAUST_MOVE = 0.3 -- exhaustion increased this value if player movement detected
|
||||
@ -69,7 +69,7 @@ end
|
||||
|
||||
--load custom settings
|
||||
local set = io.open(minetest.get_modpath("hud").."/hud.conf", "r")
|
||||
if set then
|
||||
if set then
|
||||
dofile(minetest.get_modpath("hud").."/hud.conf")
|
||||
set:close()
|
||||
else
|
||||
@ -243,7 +243,7 @@ hud.set_hunger = function(player)
|
||||
if not inv or not value then return nil end
|
||||
if value > 30 then value = 30 end
|
||||
if value < 0 then value = 0 end
|
||||
|
||||
|
||||
inv:set_stack("hunger", 1, ItemStack({name=":", count=value+1}))
|
||||
|
||||
return true
|
||||
@ -321,7 +321,7 @@ minetest.after(2.5, function()
|
||||
|
||||
-- update all hud elements
|
||||
update_hud(player)
|
||||
|
||||
|
||||
if HUD_ENABLE_HUNGER then
|
||||
local controls = player:get_player_control()
|
||||
-- Determine if the player is walking
|
||||
@ -331,7 +331,7 @@ minetest.after(2.5, function()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
if timer > 4 then timer = 0 end
|
||||
if timer2 > HUD_HUNGER_TICK then timer2 = 0 end
|
||||
|
Reference in New Issue
Block a user