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:
parent
4e2970e34d
commit
478e9bef17
14 changed files with 82 additions and 37 deletions
|
@ -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
|
||||
|
|
13
builtin/sscsm_client/init.lua
Normal file
13
builtin/sscsm_client/init.lua
Normal 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")
|
5
builtin/sscsm_client/register.lua
Normal file
5
builtin/sscsm_client/register.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local builtin_shared = ...
|
||||
|
||||
local make_registration = builtin_shared.make_registration
|
||||
|
||||
core.registered_globalsteps, core.register_globalstep = make_registration()
|
0
builtin/sscsm_server/init.lua
Normal file
0
builtin/sscsm_server/init.lua
Normal file
Loading…
Add table
Add a link
Reference in a new issue