]> git.lizzy.rs Git - xdecor.git/blobdiff - init.lua
Add settings and compatibility with moreblocks and stairs
[xdecor.git] / init.lua
index df70e484fdb238450c194f56482a50113f63e10a..bab6806c67b06b72559ab85fc7958187b15f0212 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -2,19 +2,36 @@
 xdecor = {}
 local modpath = minetest.get_modpath("xdecor")
 
+-- Handlers.
+dofile(modpath.."/handlers/animations.lua")
+dofile(modpath.."/handlers/helpers.lua")
 dofile(modpath.."/handlers/nodeboxes.lua")
 dofile(modpath.."/handlers/registration.lua")
-dofile(modpath.."/chess.lua")
-dofile(modpath.."/cooking.lua")
-dofile(modpath.."/crafts.lua")
-dofile(modpath.."/enchanting.lua")
-dofile(modpath.."/hive.lua")
-dofile(modpath.."/itemframe.lua")
-dofile(modpath.."/mailbox.lua")
-dofile(modpath.."/rope.lua")
-dofile(modpath.."/nodes.lua")
-dofile(modpath.."/sitting.lua")
-dofile(modpath.."/worktable.lua")
-dofile(modpath.."/xwall.lua")
---print(string.format("xdecor loaded in %.2f ms", (os.clock()-t)*1000))
 
+-- Node and others
+dofile(modpath.."/src/alias.lua")
+dofile(modpath.."/src/nodes.lua")
+dofile(modpath.."/src/recipes.lua")
+
+-- Elements
+local submod = {
+       "chess",
+       "cooking",
+       "enchanting",
+       "hive",
+       "itemframe",
+       "mailbox",
+       "mechanisms",
+       "rope",
+       "workbench"
+}
+
+for _, name in ipairs(submod) do
+       local enable = not(minetest.settings:get_bool("disable_xdecor_"..name))
+       if enable then
+               dofile(modpath.."/src/"..name..".lua")
+       end
+end
+
+
+--print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))