RCT1: create function to get number of additional zero cars

This commit is contained in:
Gymnasiast committed 2026-09-13 01:14:12 +02:00
1 parent 1e7fdd7ba6
commit fdcda7be5d
2 files changed
+24

No files matched your search

+19
View File
@@ -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
+5
View File
@@ -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