From 5e9e219911684c89c36c02ebd391369e0f4d4b27 Mon Sep 17 00:00:00 2001 From: Rui Date: Sun, 24 Jul 2016 20:18:42 +0900 Subject: [PATCH 1/2] Use `Settings` to read the config file --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 7bcbaea..63be0c5 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ -dofile(minetest.get_modpath("quartz").."/settings.txt") +local settings = Settings(minetest.get_modpath("quartz").."/settings.txt") -- -- Item Registration @@ -153,7 +153,7 @@ minetest.register_abm({ -- Compatibility with stairsplus -- -if minetest.get_modpath("moreblocks") and ENABLE_STAIRSPLUS then +if minetest.get_modpath("moreblocks") and settings:get_bool("ENABLE_STAIRSPLUS") then register_stair_slab_panel_micro("quartz", "block", "quartz:block", {cracky=3}, {"quartz_block.png"}, @@ -187,7 +187,7 @@ end -- Deprecated -- -if ENABLE_HORIZONTAL_PILLAR then +if settings:get_bool("ENABLE_HORIZONTAL_PILLAR") then -- Quartz Pillar (horizontal) minetest.register_node("quartz:pillar_horizontal", { description = "Quartz Pillar Horizontal", From 71cf35138445f8718cf895ee73e0d9bc23b75034 Mon Sep 17 00:00:00 2001 From: Rui Date: Wed, 27 Jul 2016 23:47:00 +0900 Subject: [PATCH 2/2] Change "--" in the config file to "#" --- settings.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.txt b/settings.txt index 7bed3f8..3a11106 100644 --- a/settings.txt +++ b/settings.txt @@ -1,7 +1,7 @@ --- Set this to true to allow usage of the stairsplus mod in moreblocks +# Set this to true to allow usage of the stairsplus mod in moreblocks ENABLE_STAIRSPLUS = false --- This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars) +# This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars) ENABLE_HORIZONTAL_PILLAR = true