init.lua 740 B

12345678910111213141516171819202122232425262728293031323334
  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/nodes.lua")
  9. dofile(modpath .. "/src/recipes.lua")
  10. local subpart = {
  11. "chess",
  12. "cooking",
  13. "enchanting",
  14. "hive",
  15. "itemframe",
  16. "mailbox",
  17. "mechanisms",
  18. "rope",
  19. "workbench",
  20. }
  21. for _, name in ipairs(subpart) do
  22. local enable = minetest.settings:get_bool("enable_xdecor_" .. name)
  23. if enable or enable == nil then
  24. dofile(modpath .. "/src/" .. name .. ".lua")
  25. end
  26. end
  27. --print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))