diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-23 15:36:18 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-23 15:36:18 +0100 |
commit | 844e12403400b455fe5df8c2e19145a2ed1a7d45 (patch) | |
tree | 81839795869676892b0219d4d1533fb40d6074af /NorthstarDedicatedTest/modmanager.cpp | |
parent | 23a1dafcde70822a9899e9aab190f36521c1aedd (diff) | |
download | NorthstarLauncher-844e12403400b455fe5df8c2e19145a2ed1a7d45.tar.gz NorthstarLauncher-844e12403400b455fe5df8c2e19145a2ed1a7d45.zip |
add support for building scripts.rson at runtime
Diffstat (limited to 'NorthstarDedicatedTest/modmanager.cpp')
-rw-r--r-- | NorthstarDedicatedTest/modmanager.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/modmanager.cpp b/NorthstarDedicatedTest/modmanager.cpp index 14182017..05974d4e 100644 --- a/NorthstarDedicatedTest/modmanager.cpp +++ b/NorthstarDedicatedTest/modmanager.cpp @@ -225,16 +225,16 @@ void ModManager::LoadMods() // register mod files - if (fs::exists(mod->ModDirectory / "mod")) + if (fs::exists(mod->ModDirectory / MOD_OVERRIDE_DIR)) { - for (fs::directory_entry file : fs::recursive_directory_iterator(mod->ModDirectory / "mod")) + for (fs::directory_entry file : fs::recursive_directory_iterator(mod->ModDirectory / MOD_OVERRIDE_DIR)) { if (file.is_regular_file()) { // super temp because it relies hard on load order ModOverrideFile* modFile = new ModOverrideFile; modFile->owningMod = mod; - modFile->path = file.path().lexically_relative(mod->ModDirectory / "mod").lexically_normal(); + modFile->path = file.path().lexically_relative(mod->ModDirectory / MOD_OVERRIDE_DIR).lexically_normal(); m_modFiles.push_back(modFile); } } @@ -243,6 +243,15 @@ void ModManager::LoadMods() } +void ModManager::CompileAssetsForFile(const char* filename) +{ + fs::path path(filename); + + if (!path.filename().compare("scripts.rson")) + BuildScriptsRson(); + +} + void InitialiseModManager(HMODULE baseAddress) { g_ModManager = new ModManager(); |