1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-16 01:45:36 +02:00

Lua on each mapgen thread (#13092)

This commit is contained in:
sfan5
2024-02-13 22:47:30 +01:00
committed by GitHub
parent d4b107e2e8
commit 3cac17d23e
32 changed files with 1329 additions and 193 deletions

21
builtin/emerge/init.lua Normal file
View File

@@ -0,0 +1,21 @@
local gamepath = core.get_builtin_path() .. "game" .. DIR_DELIM
local commonpath = core.get_builtin_path() .. "common" .. DIR_DELIM
local epath = core.get_builtin_path() .. "emerge" .. DIR_DELIM
local builtin_shared = {}
-- Import parts shared with "game" environment
dofile(gamepath .. "constants.lua")
assert(loadfile(commonpath .. "item_s.lua"))(builtin_shared)
dofile(gamepath .. "misc_s.lua")
dofile(gamepath .. "features.lua")
dofile(gamepath .. "voxelarea.lua")
-- Now for our own stuff
assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
assert(loadfile(epath .. "register.lua"))(builtin_shared)
dofile(epath .. "env.lua")
builtin_shared.cache_content_ids()
core.log("info", "Initialized emerge Lua environment")