Feature: Set exclusive access to industry from GS (#8115)

This commit is contained in:
Pavel Stupnikov
2020-12-22 16:29:48 +03:00
committed by GitHub
parent b7751c483e
commit 9a45a0f535
11 changed files with 137 additions and 5 deletions

View File

@@ -3125,6 +3125,14 @@ bool AfterLoadGame()
}
}
/* Make sure all industries exclusive supplier/consumer set correctly. */
if (IsSavegameVersionBefore(SLV_GS_INDUSTRY_CONTROL)) {
for (Industry *i : Industry::Iterate()) {
i->exclusive_supplier = INVALID_OWNER;
i->exclusive_consumer = INVALID_OWNER;
}
}
/* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */
Station::RecomputeCatchmentForAll();