Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.

Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
This commit is contained in:
2024-01-06 15:29:48 +00:00
committed by Peter Nelson
parent 952d111b94
commit 400ae65ff2
13 changed files with 99 additions and 103 deletions

View File

@@ -1462,11 +1462,11 @@ bool AfterLoadGame()
/* Setting no refit flags to all orders in savegames from before refit in orders were added */
if (IsSavegameVersionBefore(SLV_36)) {
for (Order *order : Order::Iterate()) {
order->SetRefit(CT_NO_REFIT);
order->SetRefit(CARGO_NO_REFIT);
}
for (Vehicle *v : Vehicle::Iterate()) {
v->current_order.SetRefit(CT_NO_REFIT);
v->current_order.SetRefit(CARGO_NO_REFIT);
}
}