Change: [Script] Store randomizers in savegame (#12063)

This commit is contained in:
Loïc Guilloux
2024-02-12 01:22:57 +01:00
committed by GitHub
parent d6f34a21e8
commit 3ffa176870
5 changed files with 59 additions and 2 deletions

View File

@@ -255,8 +255,6 @@ static void InitializeWindowsAndCaches()
UpdateAllVirtCoords();
ResetViewportAfterLoadGame();
ScriptObject::InitializeRandomizers();
for (Company *c : Company::Iterate()) {
/* For each company, verify (while loading a scenario) that the inauguration date is the current year and set it
* accordingly if it is not the case. No need to set it on companies that are not been used already,
@@ -3288,6 +3286,10 @@ bool AfterLoadGame()
}
}
if (IsSavegameVersionBefore(SLV_SCRIPT_RANDOMIZER)) {
ScriptObject::InitializeRandomizers();
}
for (Company *c : Company::Iterate()) {
UpdateCompanyLiveries(c);
}