More settings cleanup

This commit is contained in:
Wuzzy 2022-05-05 08:20:10 +02:00
parent a57d37d1c4
commit 6f0c72bb2d
3 changed files with 12 additions and 3 deletions

View File

@ -11,6 +11,7 @@ local enable_headbars = minetest.settings:get_bool("headbars_enable")
if enable_headbars == nil then enable_headbars = true end
local headbars_scale = tonumber(minetest.settings:get("headbars_scale")) or 1.0
headbars_scale = math.max(0.25, headbars_scale)
function headbars.get_sprite(icon, background, max, amt)
local img = "[combine:" .. (max * 8) .. "x16:0,0=blank.png:0,0=blank.png"

View File

@ -22,7 +22,7 @@ local saving = false
-- Seconds per hunger update, 2.0 is slightly fast
local timer_interval = tonumber(minetest.settings:get("hunger_step")) or 3.0
timer_interval = math.max(0, timer_interval)
timer_interval = math.max(0.0, timer_interval)
local timer = 0
local function save_hunger()

View File

@ -21,9 +21,11 @@ hunger_enable (Enable hunger) bool true
# This number specifies the interval in seconds
# at which the hunger of players is updated.
# Also affects the healing rate.
# The lower this number, the faster players get hungry.
# Very low numbers might cause performance problems!
hunger_step (Hunger speed) float 3.0 0.1
# At 0, hunger is updated at every server step,
# which is really fast!
hunger_step (Hunger frequency) float 3.0 0.0
[World]
# If enabled, the weather will change from time to time.
@ -79,6 +81,12 @@ static_spawn_radius (Spawn point safety radius) int 256 0
# This will add an graphical effect that slightly darkens the edges of the screen.
vignette_enable (Enable vignette) bool true
# This will enable a health display over the head of each player.
headbars_enable (Enable over-head health bars) bool true
# Scale of the health display over the player heads.
headbars_scale (Scale of over-head health bars) float 1.0 0.25
# Enables blood particles when attacking mobs.
# If disabled, there will be other, less “gruesome” particle effects.
mobs_enable_blood (Enable blood) bool false