Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game. CT_INVALID is a CargoType used for defining default properties.
This commit is contained in:

committed by
Peter Nelson

parent
4fd986bd07
commit
952d111b94
@@ -273,7 +273,7 @@ static void GetCargoSummaryOfArticulatedVehicle(const Train *v, CargoSummary &su
|
||||
if (!v->GetEngine()->CanCarryCargo()) continue;
|
||||
|
||||
CargoSummaryItem new_item;
|
||||
new_item.cargo = v->cargo_cap > 0 ? v->cargo_type : (CargoID)CT_INVALID;
|
||||
new_item.cargo = v->cargo_cap > 0 ? v->cargo_type : INVALID_CARGO;
|
||||
new_item.subtype = GetCargoSubtypeText(v);
|
||||
if (!IsValidCargoID(new_item.cargo) && new_item.subtype == STR_EMPTY) continue;
|
||||
|
||||
|
Reference in New Issue
Block a user