2
0

init.lua 737 B

123456789101112131415161718192021
  1. local gamepath = core.get_builtin_path() .. "game" .. DIR_DELIM
  2. local commonpath = core.get_builtin_path() .. "common" .. DIR_DELIM
  3. local epath = core.get_builtin_path() .. "emerge" .. DIR_DELIM
  4. local builtin_shared = {}
  5. -- Import parts shared with "game" environment
  6. dofile(gamepath .. "constants.lua")
  7. assert(loadfile(commonpath .. "item_s.lua"))(builtin_shared)
  8. dofile(gamepath .. "misc_s.lua")
  9. dofile(gamepath .. "features.lua")
  10. dofile(gamepath .. "voxelarea.lua")
  11. -- Now for our own stuff
  12. assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
  13. assert(loadfile(epath .. "register.lua"))(builtin_shared)
  14. dofile(epath .. "env.lua")
  15. builtin_shared.cache_content_ids()
  16. core.log("info", "Initialized emerge Lua environment")