From 8027e1e08c283de207bb9898d89f6dd3d237c88d Mon Sep 17 00:00:00 2001 From: Desour Date: Sat, 22 Feb 2025 15:40:37 +0100 Subject: [PATCH] fix this path todos --- builtin/init.lua | 5 +++-- src/script/sscsm/sscsm_environment.h | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/builtin/init.lua b/builtin/init.lua index 519a7483b..c0ba5f400 100644 --- a/builtin/init.lua +++ b/builtin/init.lua @@ -76,9 +76,10 @@ 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 +elseif INIT == "sscsm" and core.get_current_modname() == "*client_builtin*" then dofile(scriptdir .. "sscsm_client" .. DIR_DELIM .. "init.lua") +elseif INIT == "sscsm" and core.get_current_modname() == "*server_builtin*" then + dofile(scriptdir .. "sscsm_server" .. DIR_DELIM .. "init.lua") elseif INIT == "emerge" then dofile(scriptdir .. "emerge" .. DIR_DELIM .. "init.lua") elseif INIT == "pause_menu" then diff --git a/src/script/sscsm/sscsm_environment.h b/src/script/sscsm/sscsm_environment.h index 643e49fcd..e929fab75 100644 --- a/src/script/sscsm/sscsm_environment.h +++ b/src/script/sscsm/sscsm_environment.h @@ -20,11 +20,11 @@ class SSCSMEnvironment : public Thread { std::shared_ptr m_channel; std::unique_ptr m_script; - // virtual file system. - // TODO: decide and doc how paths look like, maybe: - // /client_builtin/subdir/foo.lua - // /server_builtin/subdir/foo.lua - // /mods/modname/subdir/foo.lua + // the virtual file system. + // paths look like this: + // *client_builtin*:subdir/foo.lua + // *server_builtin*:subdir/foo.lua + // modname:subdir/foo.lua std::unique_ptr m_vfs; void *run() override;