diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-09-30 21:46:08 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-09-30 21:46:08 +0100 |
commit | 1ff8e068e62d095775ef2ae54d3685d89238f28c (patch) | |
tree | 5aedcc16f144c2225d7398dd1f19b4f11cd467c1 /NorthstarDedicatedTest/scriptsrson.cpp | |
parent | 8b93a09f5b12ce7967df5824794ed24b3ff31cdc (diff) | |
download | NorthstarLauncher-1ff8e068e62d095775ef2ae54d3685d89238f28c.tar.gz NorthstarLauncher-1ff8e068e62d095775ef2ae54d3685d89238f28c.zip |
small modmanager refactors
Diffstat (limited to 'NorthstarDedicatedTest/scriptsrson.cpp')
-rw-r--r-- | NorthstarDedicatedTest/scriptsrson.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/NorthstarDedicatedTest/scriptsrson.cpp b/NorthstarDedicatedTest/scriptsrson.cpp index bc49ed26..1c37d000 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 = new ModOverrideFile; - overrideFile->owningMod = nullptr; - overrideFile->path = VPK_SCRIPTS_RSON_PATH; + ModOverrideFile overrideFile; + 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)); |