Merge pull request #22 from kaeza/optional_signs

Make signslib optional via configuration variable
This commit is contained in:
Diego Martínez 2013-08-13 00:45:15 -07:00
commit b0cbea42e0
2 changed files with 14 additions and 5 deletions

View File

@ -446,8 +446,10 @@ minetest.register_node("homedecor:fence_chainlink_corner", {
}, },
}) })
if not homedecor_disable_signs then
minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post") 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("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_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("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign")
end

View File

@ -22,6 +22,10 @@ else
S = function ( s ) return s end S = function ( s ) return s end
end end
-- Global stuff
homedecor_disable_signs = minetest.setting_getbool("homedecor.disable_signs")
-- Various Functions -- Various Functions
local dbg = function(s) 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").."/door_models.lua")
dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua") dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua")
if not homedecor_disable_signs then
dofile(minetest.get_modpath("homedecor").."/signs_lib.lua") dofile(minetest.get_modpath("homedecor").."/signs_lib.lua")
end
dofile(minetest.get_modpath("homedecor").."/fences.lua") dofile(minetest.get_modpath("homedecor").."/fences.lua")
dofile(minetest.get_modpath("homedecor").."/lighting.lua") dofile(minetest.get_modpath("homedecor").."/lighting.lua")