X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=init.lua;h=1399a1c69cb5346a9eb54c3f4779885c7ce58d3b;hb=cfca4ccdf31bb3e71db9d5ec2e255d724e66ae8e;hp=df70e484fdb238450c194f56482a50113f63e10a;hpb=f6a495985dd03f619a7d88e1e23a684f296b9ae0;p=xdecor.git diff --git a/init.lua b/init.lua index df70e48..1399a1c 100644 --- a/init.lua +++ b/init.lua @@ -1,20 +1,33 @@ --local t = os.clock() + xdecor = {} local modpath = minetest.get_modpath("xdecor") -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)) +dofile(modpath .. "/handlers/animations.lua") +dofile(modpath .. "/handlers/helpers.lua") +dofile(modpath .. "/handlers/nodeboxes.lua") +dofile(modpath .. "/handlers/registration.lua") + +dofile(modpath .. "/src/nodes.lua") +dofile(modpath .. "/src/recipes.lua") + +local subpart = { + "chess", + "cooking", + "enchanting", + "hive", + "itemframe", + "mailbox", + "mechanisms", + "rope", + "workbench", +} + +for _, name in ipairs(subpart) do + local enable = minetest.settings:get_bool("enable_xdecor_" .. name) + if enable or enable == nil then + dofile(modpath .. "/src/" .. name .. ".lua") + end +end +--print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))