made hunger use conf settings for step
This commit is contained in:
parent
85459be525
commit
a37151d82a
@ -47,6 +47,7 @@ testing_enable = false
|
||||
|
||||
# if hunger is enabled
|
||||
hunger_enable = true
|
||||
hunger_step = 2
|
||||
|
||||
# server
|
||||
max_users = 16
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
Binary file not shown.
@ -14,7 +14,7 @@ hunger.saturation = {} -- how saturated with food the player is
|
||||
local player_step = {}
|
||||
local player_health_step = {}
|
||||
local player_bar = {}
|
||||
local base_interval = 1.5 -- seconds per hunger update, 1.5 is about ok
|
||||
local base_interval = tonumber(minetest.setting_get("hunger_step")) or 2.0 -- seconds per hunger update, 1.5 is slightly fast
|
||||
local file = minetest.get_worldpath() .. "/hunger"
|
||||
|
||||
function hunger.save_hunger()
|
||||
|
Loading…
x
Reference in New Issue
Block a user