Rework Mod into a class.

`Mod` currently modifies 4 global arrays, including some that are
'public'.

The logic flow is easier to understand if this becomes a real class with
const-correctness and public/private methods.

Differential Revision: https://code.wildfiregames.com/D3981
This was SVN commit r25469.
This commit is contained in:
wraitii
2021-05-20 08:32:11 +00:00
parent 13c1b55f42
commit 04549a081d
10 changed files with 144 additions and 124 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ Status SavedGames::Save(const CStrW& name, const CStrW& description, CSimulation
WARN_RETURN(ERR::FAIL);
JS::RootedValue initAttributes(rq.cx, simulation.GetInitAttributes());
JS::RootedValue mods(rq.cx, Mod::GetLoadedModsWithVersions(simulation.GetScriptInterface()));
JS::RootedValue mods(rq.cx, g_Mods.GetLoadedModsWithVersions(simulation.GetScriptInterface()));
JS::RootedValue metadata(rq.cx);