Add setting to enable multiple churches/stadiums in scenario editor

See: #177
This commit is contained in:
Jonathan G Rennison
2020-08-03 18:46:52 +01:00
parent 3dfbeb07f6
commit b7118b60fe
10 changed files with 37 additions and 11 deletions

View File

@@ -3773,6 +3773,13 @@ bool AfterLoadGame()
_settings_game.game_creation.generation_unique_id = _interactive_random.Next(UINT32_MAX-1) + 1; /* Generates between [1;UINT32_MAX] */
}
if (SlXvIsFeatureMissing(XSLFI_TOWN_MULTI_BUILDING)) {
for (Town *t : Town::Iterate()) {
t->church_count = HasBit(t->flags, 1) ? 1 : 0;
t->stadium_count = HasBit(t->flags, 2) ? 1 : 0;
}
}
/* This needs to be done after conversion. */
RebuildViewportKdtree();
ViewportMapBuildTunnelCache();