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(gamepath .. "constants.lua")
  8. assert(loadfile(gamepath .. "item.lua"))(builtin_shared)
  9. dofile(gamepath .. "register.lua")
  10. if core.settings:get_bool("profiler.load") then
  11. profiler = dofile(scriptpath .. "profiler" .. DIR_DELIM .. "init.lua")
  12. end
  13. dofile(commonpath .. "after.lua")
  14. dofile(gamepath .. "item_entity.lua")
  15. dofile(gamepath .. "deprecated.lua")
  16. dofile(gamepath .. "misc.lua")
  17. dofile(gamepath .. "privileges.lua")
  18. dofile(gamepath .. "auth.lua")
  19. dofile(commonpath .. "chatcommands.lua")
  20. dofile(gamepath .. "chat.lua")
  21. dofile(commonpath .. "information_formspecs.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. dofile(gamepath .. "knockback.lua")
  30. profiler = nil