mirror of
https://repo.or.cz/minetest_hudbars.git
synced 2024-08-20 13:16:07 +02:00
Fix reverting to default setting value not working
This commit is contained in:
parent
4ac3b25539
commit
9d76643388
2
init.lua
2
init.lua
@ -37,6 +37,7 @@ local alignment_pattern = minetest.setting_getbool("hudbars_alignment_pattern")
|
||||
if alignment_pattern ~= nil then
|
||||
hb.settings.alignment_pattern = alignment_pattern
|
||||
if alignment_pattern ~= "zigzag" and alignment_pattern ~= "stack_up" and alignment_pattern ~= "stack_down" then
|
||||
hb.settings.alignment_pattern = "zigzag"
|
||||
minetest.log("error", "[hudbars] Invalid value for hudbars_alignment_pattern! Using default (zigzag).")
|
||||
end
|
||||
end
|
||||
@ -46,6 +47,7 @@ local bar_type = minetest.setting_getbool("hudbars_bar_type")
|
||||
if bar_type ~= nil then
|
||||
hb.settings.bar_type = bar_type
|
||||
if bar_type ~= "progress_bar" and bar_type ~= "statbar_classic" and bar_type ~= "statbar_modern" then
|
||||
hb.settings.bar_type = "progress_bar"
|
||||
minetest.log("error", "[hudbars] Invalid value for hudbars_alignment_pattern! Using default (progress_bar).")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user