init.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. local scriptpath = core.get_builtin_path()
  2. local commonpath = scriptpath.."common"..DIR_DELIM
  3. local gamepath = scriptpath.."game"..DIR_DELIM
  4. -- Shared between builtin files, but
  5. -- not exposed to outer context
  6. local builtin_shared = {}
  7. dofile(commonpath.."vector.lua")
  8. dofile(gamepath.."constants.lua")
  9. assert(loadfile(gamepath.."item.lua"))(builtin_shared)
  10. dofile(gamepath.."register.lua")
  11. if core.settings:get_bool("profiler.load") then
  12. profiler = dofile(scriptpath.."profiler"..DIR_DELIM.."init.lua")
  13. end
  14. dofile(commonpath .. "after.lua")
  15. dofile(gamepath.."item_entity.lua")
  16. dofile(gamepath.."deprecated.lua")
  17. dofile(gamepath.."misc.lua")
  18. dofile(gamepath.."privileges.lua")
  19. dofile(gamepath.."auth.lua")
  20. dofile(commonpath .. "chatcommands.lua")
  21. dofile(gamepath.."chatcommands.lua")
  22. dofile(gamepath.."static_spawn.lua")
  23. dofile(gamepath.."detached_inventory.lua")
  24. assert(loadfile(gamepath.."falling.lua"))(builtin_shared)
  25. dofile(gamepath.."features.lua")
  26. dofile(gamepath.."voxelarea.lua")
  27. dofile(gamepath.."forceloading.lua")
  28. dofile(gamepath.."statbars.lua")
  29. profiler = nil