aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptsrson.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
commit51df18abbc0c344b56f88e0a66b6b46d6aca375c (patch)
tree1ce680cb9134273870373134f845633e2c390bde /NorthstarDedicatedTest/scriptsrson.cpp
parent1ff8e068e62d095775ef2ae54d3685d89238f28c (diff)
downloadNorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.tar.gz
NorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.zip
Revert "small modmanager refactors"
This reverts commit 1ff8e068e62d095775ef2ae54d3685d89238f28c.
Diffstat (limited to 'NorthstarDedicatedTest/scriptsrson.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptsrson.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/NorthstarDedicatedTest/scriptsrson.cpp b/NorthstarDedicatedTest/scriptsrson.cpp
index 1c37d000..bc49ed26 100644
--- a/NorthstarDedicatedTest/scriptsrson.cpp
+++ b/NorthstarDedicatedTest/scriptsrson.cpp
@@ -17,14 +17,14 @@ void ModManager::BuildScriptsRson()
std::string scriptsRson = ReadVPKOriginalFile(VPK_SCRIPTS_RSON_PATH);
scriptsRson += "\n\n// START MODDED SCRIPT CONTENT\n\n"; // newline before we start custom stuff
- for (Mod mod : m_loadedMods)
+ for (Mod* mod : m_loadedMods)
{
// this isn't needed at all, just nice to have imo
scriptsRson += "// MOD: ";
- scriptsRson += mod.Name;
+ scriptsRson += mod->Name;
scriptsRson += ":\n\n";
- for (ModScript script : mod.Scripts)
+ for (ModScript* script : mod->Scripts)
{
/* should create something with this format for each script
When: "CONTEXT"
@@ -34,11 +34,11 @@ void ModManager::BuildScriptsRson()
]*/
scriptsRson += "When: \"";
- scriptsRson += script.RsonRunOn;
+ scriptsRson += script->RsonRunOn;
scriptsRson += "\"\n";
scriptsRson += "Scripts:\n[\n\t";
- scriptsRson += script.Path;
+ scriptsRson += script->Path;
scriptsRson += "\n]\n\n";
}
}
@@ -49,9 +49,9 @@ void ModManager::BuildScriptsRson()
writeStream << scriptsRson;
writeStream.close();
- ModOverrideFile overrideFile;
- overrideFile.owningMod = nullptr;
- overrideFile.path = VPK_SCRIPTS_RSON_PATH;
+ ModOverrideFile* overrideFile = new ModOverrideFile;
+ overrideFile->owningMod = nullptr;
+ 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));