Refresh town cargo acceptance/production on load on NewGRFs mismatch
Also when reloading NewGRFs
This commit is contained in:
@@ -1689,7 +1689,7 @@ bool AfterLoadGame()
|
||||
}
|
||||
|
||||
/* Check and update house and town values */
|
||||
UpdateHousesAndTowns();
|
||||
UpdateHousesAndTowns(gcf_res != GLC_ALL_GOOD);
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_43)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
@@ -3792,7 +3792,7 @@ void ReloadNewGRFData()
|
||||
/* Update company statistics. */
|
||||
AfterLoadCompanyStats();
|
||||
/* Check and update house and town values */
|
||||
UpdateHousesAndTowns();
|
||||
UpdateHousesAndTowns(true);
|
||||
/* Delete news referring to no longer existing entities */
|
||||
DeleteInvalidEngineNews();
|
||||
/* Update livery selection windows */
|
||||
|
@@ -36,7 +36,7 @@ void AfterLoadStoryBook();
|
||||
void AfterLoadLinkGraphs();
|
||||
void AfterLoadCompanyStats();
|
||||
void AfterLoadTraceRestrict();
|
||||
void UpdateHousesAndTowns();
|
||||
void UpdateHousesAndTowns(bool cargo_update_required);
|
||||
|
||||
void UpdateOldAircraft();
|
||||
|
||||
|
@@ -68,10 +68,8 @@ void RebuildTownCaches(bool cargo_update_required)
|
||||
* town, the town radius and the max passengers
|
||||
* of the town.
|
||||
*/
|
||||
void UpdateHousesAndTowns()
|
||||
void UpdateHousesAndTowns(bool cargo_update_required)
|
||||
{
|
||||
bool cargo_update_required = false;
|
||||
|
||||
for (TileIndex t = 0; t < MapSize(); t++) {
|
||||
if (!IsTileType(t, MP_HOUSE)) continue;
|
||||
|
||||
|
Reference in New Issue
Block a user