forked from rosebudai/OpenRCT2-Web
RCT1: create function to get number of additional zero cars
This commit is contained in:
2 files changed
+24
No files matched your search
@@ -1514,4 +1514,23 @@ namespace OpenRCT2::RCT1
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t getAdditionalZeroCars(const VehicleType vehicleType)
|
||||
{
|
||||
switch (vehicleType)
|
||||
{
|
||||
case VehicleType::woodenMineCars:
|
||||
case VehicleType::woodenMouseCars:
|
||||
case VehicleType::steelMouseCars:
|
||||
case VehicleType::sportscars:
|
||||
case VehicleType::racingCars:
|
||||
case VehicleType::trucks:
|
||||
case VehicleType::vintageCars:
|
||||
case VehicleType::catCars:
|
||||
case VehicleType::helicopterCars:
|
||||
return 2;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} // namespace OpenRCT2::RCT1
|
||||
@@ -57,4 +57,9 @@ namespace OpenRCT2::RCT1
|
||||
const std::vector<const char*> GetSceneryObjects(uint8_t sceneryType);
|
||||
|
||||
bool VehicleTypeIsReversed(VehicleType vehicleType);
|
||||
/**
|
||||
* For some vehicles, OpenRCT2 has added zero cars in order to make them work with scenery doors.
|
||||
* When setting the number of cars per train, this has to be taken into account.
|
||||
*/
|
||||
uint8_t getAdditionalZeroCars(VehicleType vehicleType);
|
||||
} // namespace OpenRCT2::RCT1
|
||||
Reference in new issue
Block a user