summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-05-19 23:38:13 +0200
committerWuzzy <almikes@aol.com>2015-05-19 23:38:13 +0200
commit9d76643388bffae3b1126e71d565c840207db5da (patch)
tree1fd1f6be480bbb93c43db30e91008cb92108b4e9
parent4ac3b2553910f6f3b7f12ee340beb3e6897ee8c5 (diff)
Fix reverting to default setting value not working
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 71e7275..ad6d57c 100644
--- a/init.lua
+++ b/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