Change: Decouple and remove landscape-dependent cargo types. (#11719)

Cargo types of default engines, industries and houses are now specified in terms of label.
This commit is contained in:
2024-02-04 10:16:08 +00:00
committed by GitHub
parent 83d63464db
commit 2fd9096070
32 changed files with 378 additions and 275 deletions

View File

@@ -306,11 +306,16 @@ CommandCost CmdBuildAircraft(DoCommandFlag flags, TileIndex tile, const Engine *
v->cargo_cap = avi->passenger_capacity;
v->refit_cap = 0;
u->cargo_cap = avi->mail_capacity;
u->refit_cap = 0;
v->cargo_type = e->GetDefaultCargoType();
u->cargo_type = CT_MAIL;
assert(IsValidCargoID(v->cargo_type));
CargoID mail = GetCargoIDByLabel(CT_MAIL);
if (IsValidCargoID(mail)) {
u->cargo_type = mail;
u->cargo_cap = avi->mail_capacity;
}
v->name.clear();
v->last_station_visited = INVALID_STATION;