1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

actually load the code, and make it not crash

This commit is contained in:
Desour 2025-02-21 13:31:49 +01:00
parent 4e2970e34d
commit 478e9bef17
14 changed files with 82 additions and 37 deletions

View file

@ -76,6 +76,9 @@ elseif INIT == "async_game" then
dofile(asyncpath .. "game.lua")
elseif INIT == "client" then
dofile(scriptdir .. "client" .. DIR_DELIM .. "init.lua")
elseif INIT == "sscsm" then
-- FIXME: different branch for sscsm_server
dofile(scriptdir .. "sscsm_client" .. DIR_DELIM .. "init.lua")
elseif INIT == "emerge" then
dofile(scriptdir .. "emerge" .. DIR_DELIM .. "init.lua")
elseif INIT == "pause_menu" then

View file

@ -0,0 +1,13 @@
local scriptpath = core.get_builtin_path()
local commonpath = scriptpath .. "common" .. DIR_DELIM
local mypath = scriptpath .. "sscsm_client".. DIR_DELIM
-- Shared between builtin files, but
-- not exposed to outer context
local builtin_shared = {}
assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
assert(loadfile(mypath .. "register.lua"))(builtin_shared)
dofile(commonpath .. "after.lua")

View file

@ -0,0 +1,5 @@
local builtin_shared = ...
local make_registration = builtin_shared.make_registration
core.registered_globalsteps, core.register_globalstep = make_registration()

View file