From 3c34a04605483879b8c9f91443ca63e669ce57d6 Mon Sep 17 00:00:00 2001 From: kaeza Date: Tue, 13 Aug 2013 04:36:06 -0300 Subject: [PATCH] Make signslib optional via configuration variable --- fences.lua | 10 ++++++---- init.lua | 9 ++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/fences.lua b/fences.lua index 7752f5b..f11a32b 100644 --- a/fences.lua +++ b/fences.lua @@ -446,8 +446,10 @@ minetest.register_node("homedecor:fence_chainlink_corner", { }, }) -minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post") +if not homedecor_disable_signs then + minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post") -homedecor_register_fence_with_sign("default:fence_wood", "signs:sign_post") -homedecor_register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign") -homedecor_register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign") + homedecor_register_fence_with_sign("default:fence_wood", "signs:sign_post") + homedecor_register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign") + homedecor_register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign") +end diff --git a/init.lua b/init.lua index 6a1d5f2..738b82d 100644 --- a/init.lua +++ b/init.lua @@ -22,6 +22,10 @@ else S = function ( s ) return s end end +-- Global stuff + +homedecor_disable_signs = minetest.setting_getbool("homedecor.disable_signs") + -- Various Functions local dbg = function(s) @@ -79,7 +83,10 @@ dofile(minetest.get_modpath("homedecor").."/slopes.lua") dofile(minetest.get_modpath("homedecor").."/door_models.lua") dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua") -dofile(minetest.get_modpath("homedecor").."/signs_lib.lua") +if not homedecor_disable_signs then + dofile(minetest.get_modpath("homedecor").."/signs_lib.lua") +end + dofile(minetest.get_modpath("homedecor").."/fences.lua") dofile(minetest.get_modpath("homedecor").."/lighting.lua")