init.lua 726 B

123456789101112131415161718192021222324252627282930313233
  1. --local t = os.clock()
  2. xdecor = {}
  3. local modpath = minetest.get_modpath("xdecor")
  4. dofile(modpath.."/handlers/animations.lua")
  5. dofile(modpath.."/handlers/helpers.lua")
  6. dofile(modpath.."/handlers/nodeboxes.lua")
  7. dofile(modpath.."/handlers/registration.lua")
  8. dofile(modpath.."/src/alias.lua")
  9. dofile(modpath.."/src/nodes.lua")
  10. dofile(modpath.."/src/recipes.lua")
  11. local subpart = {
  12. "chess",
  13. "cooking",
  14. "enchanting",
  15. "hive",
  16. "mechanisms",
  17. "rope",
  18. "workbench"
  19. }
  20. for _, name in pairs(subpart) do
  21. local enable = minetest.settings:get_bool("enable_xdecor_"..name)
  22. if enable or enable == nil then
  23. dofile(modpath.."/src/"..name..".lua")
  24. end
  25. end
  26. --print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))