1
0
forked from mirrors/0ad

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
+3 -3
View File
@@ -598,7 +598,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
g_VFS = CreateVfs();
// Mount with highest priority, we don't want mods overwriting this.
g_VFS->Mount(L"cache/", paths.Cache(), VFS_MOUNT_ARCHIVABLE, VFS_MAX_PRIORITY);
MountMods(paths, Mod::GetModsFromArguments(args, INIT_MODS));
MountMods(paths, g_Mods.GetModsFromArguments(args, INIT_MODS));
{
CReplayPlayer replay;
@@ -698,7 +698,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
// Do not install mods again in case of restart (typically from the mod selector)
modsToInstall.clear();
Mod::ClearIncompatibleMods();
g_Mods.ClearIncompatibleMods();
Shutdown(0);
MainControllerShutdown();
@@ -708,7 +708,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
#if OS_MACOSX
if (g_Shutdown == ShutdownType::RestartAsAtlas)
startNewAtlasProcess();
startNewAtlasProcess(g_Mods.GetEnabledMods());
#else
if (g_Shutdown == ShutdownType::RestartAsAtlas)
ATLAS_RunIfOnCmdLine(args, true);