mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
Rename cheat variables to match new code style
This commit is contained in:
@@ -70,7 +70,7 @@ GameActions::Result RideSetSettingAction::Query() const
|
||||
GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_MUST_BE_CLOSED_FIRST);
|
||||
}
|
||||
|
||||
if (!RideIsModeValid(*ride) && !GetGameState().Cheats.ShowAllOperatingModes)
|
||||
if (!RideIsModeValid(*ride) && !GetGameState().Cheats.showAllOperatingModes)
|
||||
{
|
||||
LOG_ERROR("Invalid ride mode: %u", _value);
|
||||
return GameActions::Result(
|
||||
@@ -149,7 +149,7 @@ GameActions::Result RideSetSettingAction::Query() const
|
||||
}
|
||||
break;
|
||||
case RideSetSetting::RideType:
|
||||
if (!GetGameState().Cheats.AllowArbitraryRideTypeChanges)
|
||||
if (!GetGameState().Cheats.allowArbitraryRideTypeChanges)
|
||||
{
|
||||
LOG_ERROR("Arbitrary ride type changes not allowed.");
|
||||
return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE);
|
||||
@@ -263,15 +263,15 @@ bool RideSetSettingAction::RideIsModeValid(const Ride& ride) const
|
||||
bool RideSetSettingAction::RideIsValidLiftHillSpeed(const Ride& ride) const
|
||||
{
|
||||
auto& gameState = GetGameState();
|
||||
int32_t minSpeed = gameState.Cheats.UnlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed;
|
||||
int32_t maxSpeed = gameState.Cheats.UnlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed;
|
||||
int32_t minSpeed = gameState.Cheats.unlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed;
|
||||
int32_t maxSpeed = gameState.Cheats.unlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed;
|
||||
return _value >= minSpeed && _value <= maxSpeed;
|
||||
}
|
||||
|
||||
bool RideSetSettingAction::RideIsValidNumCircuits() const
|
||||
{
|
||||
int32_t minNumCircuits = 1;
|
||||
int32_t maxNumCircuits = GetGameState().Cheats.UnlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide;
|
||||
int32_t maxNumCircuits = GetGameState().Cheats.unlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide;
|
||||
return _value >= minNumCircuits && _value <= maxNumCircuits;
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ bool RideSetSettingAction::RideIsValidOperationOption(const Ride& ride) const
|
||||
const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings;
|
||||
uint8_t minValue = operatingSettings.MinValue;
|
||||
uint8_t maxValue = operatingSettings.MaxValue;
|
||||
if (GetGameState().Cheats.UnlockOperatingLimits)
|
||||
if (GetGameState().Cheats.unlockOperatingLimits)
|
||||
{
|
||||
minValue = 0;
|
||||
maxValue = 255;
|
||||
|
||||
Reference in New Issue
Block a user