Fix 3de8853e29: Industries accept/produce no cargo for pre-SLV_78 saves. (#12508)
Industry accepted/produced was trimmed too early for original and pre-SLV_78 saves, as cargo type was not stored per slot so all slots look invalid to the trim function.
This commit is contained in:
@@ -1722,6 +1722,14 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
/* Industry cargo slots were fixed size before (and including) SLV_VEHICLE_ECONOMY_AGE (either 2/3 or 16/16),
|
||||
* after this they are dynamic. Trim excess slots. */
|
||||
if (IsSavegameVersionBeforeOrAt(SLV_VEHICLE_ECONOMY_AGE)) {
|
||||
for (Industry *i : Industry::Iterate()) {
|
||||
TrimIndustryAcceptedProduced(i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Before version 81, the density of grass was always stored as zero, and
|
||||
* grassy trees were always drawn fully grassy. Furthermore, trees on rough
|
||||
* land used to have zero density, now they have full density. Therefore,
|
||||
|
||||
Reference in New Issue
Block a user