mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Replace direct RIDE_TYPE_CHAIRLIFT check with RtdFlag
This commit is contained in:
@@ -435,6 +435,8 @@ enum class RtdFlag : uint8_t
|
||||
requireExplicitListingInMusicObjects,
|
||||
|
||||
hasRoofOverWholeRide,
|
||||
|
||||
runningSpeedAffectsReliability,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1335,6 +1335,7 @@ static void RideRatingsApplyIntensityPenalty(RideRating::Tuple& ratings)
|
||||
*/
|
||||
static void SetUnreliabilityFactor(Ride& ride)
|
||||
{
|
||||
const auto& rtd = ride.getRideTypeDescriptor();
|
||||
// Special unreliability for a few ride types
|
||||
if (ride.type == RIDE_TYPE_COMPACT_INVERTED_COASTER && ride.mode == RideMode::reverseInclineLaunchedShuttle)
|
||||
{
|
||||
@@ -1344,7 +1345,7 @@ static void SetUnreliabilityFactor(Ride& ride)
|
||||
{
|
||||
ride.unreliabilityFactor += 5;
|
||||
}
|
||||
else if (ride.type == RIDE_TYPE_CHAIRLIFT)
|
||||
else if (rtd.HasFlag(RtdFlag::runningSpeedAffectsReliability))
|
||||
{
|
||||
ride.unreliabilityFactor += (ride.speed * 2);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ constexpr RideTypeDescriptor ChairliftRTD =
|
||||
RtdFlag::hasLoadOptions, RtdFlag::hasVehicleColours, RtdFlag::hasTrack,
|
||||
RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit,
|
||||
RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner,
|
||||
RtdFlag::slightlyInterestingToLookAt, RtdFlag::isSuspended),
|
||||
RtdFlag::slightlyInterestingToLookAt, RtdFlag::isSuspended, RtdFlag::runningSpeedAffectsReliability),
|
||||
.RideModes = EnumsToFlags(RideMode::stationToStation),
|
||||
.DefaultMode = RideMode::stationToStation,
|
||||
.OperatingSettings = { 1, 4 },
|
||||
|
||||
Reference in New Issue
Block a user