init.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 .. "chat.lua")
  22. dofile(commonpath .. "information_formspecs.lua")
  23. dofile(gamepath .. "static_spawn.lua")
  24. dofile(gamepath .. "detached_inventory.lua")
  25. assert(loadfile(gamepath .. "falling.lua"))(builtin_shared)
  26. dofile(gamepath .. "features.lua")
  27. dofile(gamepath .. "voxelarea.lua")
  28. dofile(gamepath .. "forceloading.lua")
  29. dofile(gamepath .. "statbars.lua")
  30. dofile(gamepath .. "knockback.lua")
  31. profiler = nil