Change: Store running AI config inside Company (#12003)

This commit is contained in:
Loïc Guilloux
2024-02-09 22:55:49 +01:00
committed by GitHub
parent 466e6bb524
commit 977aba73be
15 changed files with 98 additions and 62 deletions

View File

@@ -31,9 +31,9 @@ public:
/**
* Start up a new GameScript.
* @param randomise Whether to randomise the configured GameScript.
* @param deviate Whether to apply random deviation to the configured GameScript.
*/
static void StartNew(bool randomise = true);
static void StartNew(bool deviate = true);
/**
* Uninitialize the Game system.

View File

@@ -69,7 +69,7 @@
}
}
/* static */ void Game::StartNew(bool randomise)
/* static */ void Game::StartNew(bool deviate)
{
if (Game::instance != nullptr) return;
@@ -83,7 +83,7 @@
GameInfo *info = config->GetInfo();
if (info == nullptr) return;
if (randomise) config->AddRandomDeviation();
if (deviate) config->AddRandomDeviation();
config->AnchorUnchangeableSettings();
Backup<CompanyID> cur_company(_current_company, FILE_LINE);