aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptsrson.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/scriptsrson.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptsrson.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/scriptsrson.cpp b/NorthstarDedicatedTest/scriptsrson.cpp
index 1f08e7f1..b5aef421 100644
--- a/NorthstarDedicatedTest/scriptsrson.cpp
+++ b/NorthstarDedicatedTest/scriptsrson.cpp
@@ -20,6 +20,11 @@ void ModManager::BuildScriptsRson()
for (Mod* mod : m_loadedMods)
{
+ // this isn't needed at all, just nice to have imo
+ scriptsRson += "// MOD: ";
+ scriptsRson += mod->Name;
+ scriptsRson += ":\n\n";
+
for (ModScript* script : mod->Scripts)
{
/* should create something with this format for each script
@@ -47,8 +52,12 @@ void ModManager::BuildScriptsRson()
ModOverrideFile* overrideFile = new ModOverrideFile;
overrideFile->owningMod = nullptr;
- overrideFile->path = "scripts/vscripts/scripts.rson";
- m_modFiles.push_back(overrideFile);
+ overrideFile->path = VPK_SCRIPTS_RSON_PATH;
+
+ if (m_modFiles.find(VPK_SCRIPTS_RSON_PATH) == m_modFiles.end())
+ m_modFiles.insert(std::make_pair(VPK_SCRIPTS_RSON_PATH, overrideFile));
+ else
+ m_modFiles[VPK_SCRIPTS_RSON_PATH] = overrideFile;
// todo: for preventing dupe scripts in scripts.rson, we could actually parse when conditions with the squirrel vm, just need a way to get a result out of squirrelmanager.ExecuteCode
// this would probably be the best way to do this, imo