mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-22 05:59:10 +00:00
Codechange: Use EnumBitSet for CargoClasses. (#13491)
This commit is contained in:
@@ -209,7 +209,7 @@ uint Engine::DetermineCapacity(const Vehicle *v, uint16_t *mail_capacity) const
|
||||
CargoType default_cargo = this->GetDefaultCargoType();
|
||||
CargoType cargo_type = (v != nullptr) ? v->cargo_type : default_cargo;
|
||||
|
||||
if (mail_capacity != nullptr && this->type == VEH_AIRCRAFT && IsCargoInClass(cargo_type, CC_PASSENGERS)) {
|
||||
if (mail_capacity != nullptr && this->type == VEH_AIRCRAFT && IsCargoInClass(cargo_type, CargoClass::Passengers)) {
|
||||
*mail_capacity = GetEngineProperty(this->index, PROP_AIRCRAFT_MAIL_CAPACITY, this->u.air.mail_capacity, v);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ uint Engine::DetermineCapacity(const Vehicle *v, uint16_t *mail_capacity) const
|
||||
|
||||
case VEH_AIRCRAFT:
|
||||
capacity = GetEngineProperty(this->index, PROP_AIRCRAFT_PASSENGER_CAPACITY, this->u.air.passenger_capacity, v);
|
||||
if (!IsCargoInClass(cargo_type, CC_PASSENGERS)) {
|
||||
if (!IsCargoInClass(cargo_type, CargoClass::Passengers)) {
|
||||
extra_mail_cap = GetEngineProperty(this->index, PROP_AIRCRAFT_MAIL_CAPACITY, this->u.air.mail_capacity, v);
|
||||
}
|
||||
if (IsValidCargoType(GetCargoTypeByLabel(CT_MAIL))) {
|
||||
|
Reference in New Issue
Block a user