1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-13 11:02:47 +01:00

Change CheatType to lowerCamelCase

This commit is contained in:
Gymnasiast
2025-09-25 21:59:39 +02:00
parent d746da1d9a
commit 4158ddfe11
9 changed files with 356 additions and 356 deletions

View File

@@ -612,7 +612,7 @@ static void ShortcutToggleClearanceChecks()
{ {
auto& gameState = getGameState(); auto& gameState = getGameState();
auto cheatSetAction = GameActions::CheatSetAction( auto cheatSetAction = GameActions::CheatSetAction(
CheatType::DisableClearanceChecks, gameState.cheats.disableClearanceChecks ? 0 : 1); CheatType::disableClearanceChecks, gameState.cheats.disableClearanceChecks ? 0 : 1);
GameActions::Execute(&cheatSetAction, gameState); GameActions::Execute(&cheatSetAction, gameState);
} }

View File

@@ -858,7 +858,7 @@ static StringId window_cheats_page_titles[] = {
invalidateWidget(WIDX_MONEY_SPINNER); invalidateWidget(WIDX_MONEY_SPINNER);
break; break;
case WIDX_ADD_MONEY: case WIDX_ADD_MONEY:
CheatsSet(CheatType::AddMoney, _moneySpinnerValue); CheatsSet(CheatType::addMoney, _moneySpinnerValue);
break; break;
} }
} }
@@ -934,7 +934,7 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_NO_MONEY: case WIDX_NO_MONEY:
CheatsSet(CheatType::NoMoney, getGameState().park.flags & PARK_FLAGS_NO_MONEY ? 0 : 1); CheatsSet(CheatType::noMoney, getGameState().park.flags & PARK_FLAGS_NO_MONEY ? 0 : 1);
break; break;
case WIDX_MONEY_SPINNER: case WIDX_MONEY_SPINNER:
MoneyToString(_moneySpinnerValue, _moneySpinnerText, kMoneyStringMaxlength, false); MoneyToString(_moneySpinnerValue, _moneySpinnerText, kMoneyStringMaxlength, false);
@@ -943,10 +943,10 @@ static StringId window_cheats_page_titles[] = {
kMoneyStringMaxlength); kMoneyStringMaxlength);
break; break;
case WIDX_SET_MONEY: case WIDX_SET_MONEY:
CheatsSet(CheatType::SetMoney, _moneySpinnerValue); CheatsSet(CheatType::setMoney, _moneySpinnerValue);
break; break;
case WIDX_CLEAR_LOAN: case WIDX_CLEAR_LOAN:
CheatsSet(CheatType::ClearLoan); CheatsSet(CheatType::clearLoan);
break; break;
} }
} }
@@ -961,7 +961,7 @@ static StringId window_cheats_page_titles[] = {
if (Park::GetForcedRating() >= 0) if (Park::GetForcedRating() >= 0)
{ {
auto cheatSetAction = GameActions::CheatSetAction( auto cheatSetAction = GameActions::CheatSetAction(
CheatType::SetForcedParkRating, _parkRatingSpinnerValue); CheatType::setForcedParkRating, _parkRatingSpinnerValue);
GameActions::Execute(&cheatSetAction, getGameState()); GameActions::Execute(&cheatSetAction, getGameState());
} }
break; break;
@@ -970,7 +970,7 @@ static StringId window_cheats_page_titles[] = {
invalidateWidget(WIDX_PARK_RATING_SPINNER); invalidateWidget(WIDX_PARK_RATING_SPINNER);
if (Park::GetForcedRating() >= 0) if (Park::GetForcedRating() >= 0)
{ {
CheatsSet(CheatType::SetForcedParkRating, _parkRatingSpinnerValue); CheatsSet(CheatType::setForcedParkRating, _parkRatingSpinnerValue);
} }
break; break;
} }
@@ -1033,41 +1033,41 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_OWN_ALL_LAND: case WIDX_OWN_ALL_LAND:
CheatsSet(CheatType::OwnAllLand); CheatsSet(CheatType::ownAllLand);
break; break;
case WIDX_REMOVE_PARK_FENCES: case WIDX_REMOVE_PARK_FENCES:
CheatsSet(CheatType::RemoveParkFences); CheatsSet(CheatType::removeParkFences);
break; break;
case WIDX_OPEN_CLOSE_PARK: case WIDX_OPEN_CLOSE_PARK:
CheatsSet(CheatType::OpenClosePark); CheatsSet(CheatType::openClosePark);
break; break;
case WIDX_WIN_SCENARIO: case WIDX_WIN_SCENARIO:
CheatsSet(CheatType::WinScenario); CheatsSet(CheatType::winScenario);
break; break;
case WIDX_HAVE_FUN: case WIDX_HAVE_FUN:
CheatsSet(CheatType::HaveFun); CheatsSet(CheatType::haveFun);
break; break;
case WIDX_NEVERENDING_MARKETING: case WIDX_NEVERENDING_MARKETING:
CheatsSet(CheatType::NeverendingMarketing, !gameState.cheats.neverendingMarketing); CheatsSet(CheatType::neverendingMarketing, !gameState.cheats.neverendingMarketing);
break; break;
case WIDX_FORCE_PARK_RATING: case WIDX_FORCE_PARK_RATING:
if (Park::GetForcedRating() >= 0) if (Park::GetForcedRating() >= 0)
{ {
CheatsSet(CheatType::SetForcedParkRating, -1); CheatsSet(CheatType::setForcedParkRating, -1);
} }
else else
{ {
CheatsSet(CheatType::SetForcedParkRating, _parkRatingSpinnerValue); CheatsSet(CheatType::setForcedParkRating, _parkRatingSpinnerValue);
} }
break; break;
case WIDX_ALLOW_BUILD_IN_PAUSE_MODE: case WIDX_ALLOW_BUILD_IN_PAUSE_MODE:
CheatsSet(CheatType::BuildInPauseMode, !gameState.cheats.buildInPauseMode); CheatsSet(CheatType::buildInPauseMode, !gameState.cheats.buildInPauseMode);
break; break;
case WIDX_ALLOW_REGULAR_PATH_AS_QUEUE: case WIDX_ALLOW_REGULAR_PATH_AS_QUEUE:
CheatsSet(CheatType::AllowRegularPathAsQueue, !gameState.cheats.allowRegularPathAsQueue); CheatsSet(CheatType::allowRegularPathAsQueue, !gameState.cheats.allowRegularPathAsQueue);
break; break;
case WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES: case WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES:
CheatsSet(CheatType::AllowSpecialColourSchemes, !gameState.cheats.allowSpecialColourSchemes); CheatsSet(CheatType::allowSpecialColourSchemes, !gameState.cheats.allowSpecialColourSchemes);
break; break;
} }
} }
@@ -1078,22 +1078,22 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_CLEAR_GRASS: case WIDX_CLEAR_GRASS:
CheatsSet(CheatType::SetGrassLength, GRASS_LENGTH_CLEAR_0); CheatsSet(CheatType::setGrassLength, GRASS_LENGTH_CLEAR_0);
break; break;
case WIDX_MOWED_GRASS: case WIDX_MOWED_GRASS:
CheatsSet(CheatType::SetGrassLength, GRASS_LENGTH_MOWED); CheatsSet(CheatType::setGrassLength, GRASS_LENGTH_MOWED);
break; break;
case WIDX_WATER_PLANTS: case WIDX_WATER_PLANTS:
CheatsSet(CheatType::WaterPlants); CheatsSet(CheatType::waterPlants);
break; break;
case WIDX_FIX_VANDALISM: case WIDX_FIX_VANDALISM:
CheatsSet(CheatType::FixVandalism); CheatsSet(CheatType::fixVandalism);
break; break;
case WIDX_REMOVE_LITTER: case WIDX_REMOVE_LITTER:
CheatsSet(CheatType::RemoveLitter); CheatsSet(CheatType::removeLitter);
break; break;
case WIDX_DISABLE_PLANT_AGING: case WIDX_DISABLE_PLANT_AGING:
CheatsSet(CheatType::DisablePlantAging, !gameState.cheats.disablePlantAging); CheatsSet(CheatType::disablePlantAging, !gameState.cheats.disablePlantAging);
break; break;
} }
} }
@@ -1104,13 +1104,13 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_FREEZE_WEATHER: case WIDX_FREEZE_WEATHER:
CheatsSet(CheatType::FreezeWeather, !gameState.cheats.freezeWeather); CheatsSet(CheatType::freezeWeather, !gameState.cheats.freezeWeather);
break; break;
case WIDX_CREATE_DUCKS: case WIDX_CREATE_DUCKS:
CheatsSet(CheatType::CreateDucks, kCheatsDuckIncrement); CheatsSet(CheatType::createDucks, kCheatsDuckIncrement);
break; break;
case WIDX_REMOVE_DUCKS: case WIDX_REMOVE_DUCKS:
CheatsSet(CheatType::RemoveDucks); CheatsSet(CheatType::removeDucks);
break; break;
} }
} }
@@ -1142,7 +1142,7 @@ static StringId window_cheats_page_titles[] = {
gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Fast; gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Fast;
speed = kCheatsStaffFastSpeed; speed = kCheatsStaffFastSpeed;
} }
CheatsSet(CheatType::SetStaffSpeed, speed); CheatsSet(CheatType::setStaffSpeed, speed);
} }
} }
@@ -1155,7 +1155,7 @@ static StringId window_cheats_page_titles[] = {
if (widgetIndex == WIDX_WEATHER_DROPDOWN_BUTTON) if (widgetIndex == WIDX_WEATHER_DROPDOWN_BUTTON)
{ {
CheatsSet(CheatType::ForceWeather, dropdownIndex); CheatsSet(CheatType::forceWeather, dropdownIndex);
} }
} }
@@ -1165,84 +1165,84 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_GUEST_HAPPINESS_MAX: case WIDX_GUEST_HAPPINESS_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_HAPPINESS, kPeepMaxHappiness); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_HAPPINESS, kPeepMaxHappiness);
break; break;
case WIDX_GUEST_HAPPINESS_MIN: case WIDX_GUEST_HAPPINESS_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_HAPPINESS, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_HAPPINESS, 0);
break; break;
case WIDX_GUEST_ENERGY_MAX: case WIDX_GUEST_ENERGY_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_ENERGY, kPeepMaxEnergy); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_ENERGY, kPeepMaxEnergy);
break; break;
case WIDX_GUEST_ENERGY_MIN: case WIDX_GUEST_ENERGY_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_ENERGY, kPeepMinEnergy); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_ENERGY, kPeepMinEnergy);
break; break;
case WIDX_GUEST_HUNGER_MAX: case WIDX_GUEST_HUNGER_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_HUNGER, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_HUNGER, 0);
break; break;
case WIDX_GUEST_HUNGER_MIN: case WIDX_GUEST_HUNGER_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_HUNGER, kPeepMaxHunger); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_HUNGER, kPeepMaxHunger);
break; break;
case WIDX_GUEST_THIRST_MAX: case WIDX_GUEST_THIRST_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_THIRST, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_THIRST, 0);
break; break;
case WIDX_GUEST_THIRST_MIN: case WIDX_GUEST_THIRST_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_THIRST, kPeepMaxThirst); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_THIRST, kPeepMaxThirst);
break; break;
case WIDX_GUEST_NAUSEA_MAX: case WIDX_GUEST_NAUSEA_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_NAUSEA, kPeepMaxNausea); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_NAUSEA, kPeepMaxNausea);
break; break;
case WIDX_GUEST_NAUSEA_MIN: case WIDX_GUEST_NAUSEA_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_NAUSEA, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_NAUSEA, 0);
break; break;
case WIDX_GUEST_NAUSEA_TOLERANCE_MAX: case WIDX_GUEST_NAUSEA_TOLERANCE_MAX:
CheatsSet( CheatsSet(
CheatType::SetGuestParameter, GUEST_PARAMETER_NAUSEA_TOLERANCE, EnumValue(PeepNauseaTolerance::High)); CheatType::setGuestParameter, GUEST_PARAMETER_NAUSEA_TOLERANCE, EnumValue(PeepNauseaTolerance::High));
break; break;
case WIDX_GUEST_NAUSEA_TOLERANCE_MIN: case WIDX_GUEST_NAUSEA_TOLERANCE_MIN:
CheatsSet( CheatsSet(
CheatType::SetGuestParameter, GUEST_PARAMETER_NAUSEA_TOLERANCE, EnumValue(PeepNauseaTolerance::None)); CheatType::setGuestParameter, GUEST_PARAMETER_NAUSEA_TOLERANCE, EnumValue(PeepNauseaTolerance::None));
break; break;
case WIDX_GUEST_TOILET_MAX: case WIDX_GUEST_TOILET_MAX:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_TOILET, kPeepMaxToilet); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_TOILET, kPeepMaxToilet);
break; break;
case WIDX_GUEST_TOILET_MIN: case WIDX_GUEST_TOILET_MIN:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_TOILET, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_TOILET, 0);
break; break;
case WIDX_GUEST_RIDE_INTENSITY_MORE_THAN_1: case WIDX_GUEST_RIDE_INTENSITY_MORE_THAN_1:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY, 1); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY, 1);
break; break;
case WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15: case WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15:
CheatsSet(CheatType::SetGuestParameter, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY, 0); CheatsSet(CheatType::setGuestParameter, GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY, 0);
break; break;
case WIDX_TRAM_GUESTS: case WIDX_TRAM_GUESTS:
CheatsSet(CheatType::GenerateGuests, kCheatsTramIncrement); CheatsSet(CheatType::generateGuests, kCheatsTramIncrement);
break; break;
case WIDX_REMOVE_ALL_GUESTS: case WIDX_REMOVE_ALL_GUESTS:
CheatsSet(CheatType::RemoveAllGuests); CheatsSet(CheatType::removeAllGuests);
break; break;
case WIDX_GIVE_GUESTS_MONEY: case WIDX_GIVE_GUESTS_MONEY:
CheatsSet(CheatType::GiveAllGuests, OBJECT_MONEY); CheatsSet(CheatType::giveAllGuests, OBJECT_MONEY);
break; break;
case WIDX_GIVE_GUESTS_PARK_MAPS: case WIDX_GIVE_GUESTS_PARK_MAPS:
CheatsSet(CheatType::GiveAllGuests, OBJECT_PARK_MAP); CheatsSet(CheatType::giveAllGuests, OBJECT_PARK_MAP);
break; break;
case WIDX_GIVE_GUESTS_BALLOONS: case WIDX_GIVE_GUESTS_BALLOONS:
CheatsSet(CheatType::GiveAllGuests, OBJECT_BALLOON); CheatsSet(CheatType::giveAllGuests, OBJECT_BALLOON);
break; break;
case WIDX_GIVE_GUESTS_UMBRELLAS: case WIDX_GIVE_GUESTS_UMBRELLAS:
CheatsSet(CheatType::GiveAllGuests, OBJECT_UMBRELLA); CheatsSet(CheatType::giveAllGuests, OBJECT_UMBRELLA);
break; break;
case WIDX_GUEST_IGNORE_RIDE_INTENSITY: case WIDX_GUEST_IGNORE_RIDE_INTENSITY:
CheatsSet(CheatType::IgnoreRideIntensity, !gameState.cheats.ignoreRideIntensity); CheatsSet(CheatType::ignoreRideIntensity, !gameState.cheats.ignoreRideIntensity);
break; break;
case WIDX_GUEST_IGNORE_PRICE: case WIDX_GUEST_IGNORE_PRICE:
CheatsSet(CheatType::IgnorePrice, !gameState.cheats.ignorePrice); CheatsSet(CheatType::ignorePrice, !gameState.cheats.ignorePrice);
break; break;
case WIDX_DISABLE_VANDALISM: case WIDX_DISABLE_VANDALISM:
CheatsSet(CheatType::DisableVandalism, !gameState.cheats.disableVandalism); CheatsSet(CheatType::disableVandalism, !gameState.cheats.disableVandalism);
break; break;
case WIDX_DISABLE_LITTERING: case WIDX_DISABLE_LITTERING:
CheatsSet(CheatType::DisableLittering, !gameState.cheats.disableLittering); CheatsSet(CheatType::disableLittering, !gameState.cheats.disableLittering);
break; break;
} }
} }
@@ -1253,28 +1253,28 @@ static StringId window_cheats_page_titles[] = {
switch (widgetIndex) switch (widgetIndex)
{ {
case WIDX_RENEW_RIDES: case WIDX_RENEW_RIDES:
CheatsSet(CheatType::RenewRides); CheatsSet(CheatType::renewRides);
break; break;
case WIDX_MAKE_DESTRUCTIBLE: case WIDX_MAKE_DESTRUCTIBLE:
CheatsSet(CheatType::MakeDestructible, !gameState.cheats.makeAllDestructible); CheatsSet(CheatType::makeDestructible, !gameState.cheats.makeAllDestructible);
break; break;
case WIDX_FIX_ALL: case WIDX_FIX_ALL:
CheatsSet(CheatType::FixRides); CheatsSet(CheatType::fixRides);
break; break;
case WIDX_UNLOCK_OPERATING_LIMITS: case WIDX_UNLOCK_OPERATING_LIMITS:
CheatsSet(CheatType::FastLiftHill, !gameState.cheats.unlockOperatingLimits); CheatsSet(CheatType::fastLiftHill, !gameState.cheats.unlockOperatingLimits);
break; break;
case WIDX_DISABLE_BRAKES_FAILURE: case WIDX_DISABLE_BRAKES_FAILURE:
CheatsSet(CheatType::DisableBrakesFailure, !gameState.cheats.disableBrakesFailure); CheatsSet(CheatType::disableBrakesFailure, !gameState.cheats.disableBrakesFailure);
break; break;
case WIDX_DISABLE_ALL_BREAKDOWNS: case WIDX_DISABLE_ALL_BREAKDOWNS:
CheatsSet(CheatType::DisableAllBreakdowns, !gameState.cheats.disableAllBreakdowns); CheatsSet(CheatType::disableAllBreakdowns, !gameState.cheats.disableAllBreakdowns);
break; break;
case WIDX_RESET_CRASH_STATUS: case WIDX_RESET_CRASH_STATUS:
CheatsSet(CheatType::ResetCrashStatus); CheatsSet(CheatType::resetCrashStatus);
break; break;
case WIDX_10_MINUTE_INSPECTIONS: case WIDX_10_MINUTE_INSPECTIONS:
CheatsSet(CheatType::TenMinuteInspections); CheatsSet(CheatType::tenMinuteInspections);
break; break;
case WIDX_SHOW_ALL_OPERATING_MODES: case WIDX_SHOW_ALL_OPERATING_MODES:
{ {
@@ -1282,7 +1282,7 @@ static StringId window_cheats_page_titles[] = {
{ {
ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {});
} }
CheatsSet(CheatType::ShowAllOperatingModes, !gameState.cheats.showAllOperatingModes); CheatsSet(CheatType::showAllOperatingModes, !gameState.cheats.showAllOperatingModes);
} }
break; break;
case WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES: case WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES:
@@ -1291,7 +1291,7 @@ static StringId window_cheats_page_titles[] = {
{ {
ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {});
} }
CheatsSet(CheatType::ShowVehiclesFromOtherTrackTypes, !gameState.cheats.showVehiclesFromOtherTrackTypes); CheatsSet(CheatType::showVehiclesFromOtherTrackTypes, !gameState.cheats.showVehiclesFromOtherTrackTypes);
} }
break; break;
case WIDX_DISABLE_TRAIN_LENGTH_LIMITS: case WIDX_DISABLE_TRAIN_LENGTH_LIMITS:
@@ -1300,11 +1300,11 @@ static StringId window_cheats_page_titles[] = {
{ {
ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {});
} }
CheatsSet(CheatType::DisableTrainLengthLimit, !gameState.cheats.disableTrainLengthLimit); CheatsSet(CheatType::disableTrainLengthLimit, !gameState.cheats.disableTrainLengthLimit);
} }
break; break;
case WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK: case WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK:
CheatsSet(CheatType::EnableChainLiftOnAllTrack, !gameState.cheats.enableChainLiftOnAllTrack); CheatsSet(CheatType::enableChainLiftOnAllTrack, !gameState.cheats.enableChainLiftOnAllTrack);
break; break;
case WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES: case WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES:
{ {
@@ -1312,17 +1312,17 @@ static StringId window_cheats_page_titles[] = {
{ {
ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {});
} }
CheatsSet(CheatType::AllowArbitraryRideTypeChanges, !gameState.cheats.allowArbitraryRideTypeChanges); CheatsSet(CheatType::allowArbitraryRideTypeChanges, !gameState.cheats.allowArbitraryRideTypeChanges);
} }
break; break;
case WIDX_DISABLE_RIDE_VALUE_AGING: case WIDX_DISABLE_RIDE_VALUE_AGING:
CheatsSet(CheatType::DisableRideValueAging, !gameState.cheats.disableRideValueAging); CheatsSet(CheatType::disableRideValueAging, !gameState.cheats.disableRideValueAging);
break; break;
case WIDX_IGNORE_RESEARCH_STATUS: case WIDX_IGNORE_RESEARCH_STATUS:
CheatsSet(CheatType::IgnoreResearchStatus, !gameState.cheats.ignoreResearchStatus); CheatsSet(CheatType::ignoreResearchStatus, !gameState.cheats.ignoreResearchStatus);
break; break;
case WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES: case WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES:
CheatsSet(CheatType::EnableAllDrawableTrackPieces, !gameState.cheats.enableAllDrawableTrackPieces); CheatsSet(CheatType::enableAllDrawableTrackPieces, !gameState.cheats.enableAllDrawableTrackPieces);
break; break;
case WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS: case WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS:
{ {
@@ -1330,7 +1330,7 @@ static StringId window_cheats_page_titles[] = {
{ {
ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {});
} }
CheatsSet(CheatType::AllowTrackPlaceInvalidHeights, !gameState.cheats.allowTrackPlaceInvalidHeights); CheatsSet(CheatType::allowTrackPlaceInvalidHeights, !gameState.cheats.allowTrackPlaceInvalidHeights);
} }
break; break;
} }

View File

@@ -706,13 +706,13 @@ namespace OpenRCT2::Ui::Windows
ContextOpenWindow(WindowClass::editorScenarioOptions); ContextOpenWindow(WindowClass::editorScenarioOptions);
break; break;
case DDIDX_ENABLE_SANDBOX_MODE: case DDIDX_ENABLE_SANDBOX_MODE:
CheatsSet(CheatType::SandboxMode, !getGameState().cheats.sandboxMode); CheatsSet(CheatType::sandboxMode, !getGameState().cheats.sandboxMode);
break; break;
case DDIDX_DISABLE_CLEARANCE_CHECKS: case DDIDX_DISABLE_CLEARANCE_CHECKS:
CheatsSet(CheatType::DisableClearanceChecks, !getGameState().cheats.disableClearanceChecks); CheatsSet(CheatType::disableClearanceChecks, !getGameState().cheats.disableClearanceChecks);
break; break;
case DDIDX_DISABLE_SUPPORT_LIMITS: case DDIDX_DISABLE_SUPPORT_LIMITS:
CheatsSet(CheatType::DisableSupportLimits, !getGameState().cheats.disableSupportLimits); CheatsSet(CheatType::disableSupportLimits, !getGameState().cheats.disableSupportLimits);
break; break;
} }
} }

View File

@@ -84,37 +84,37 @@ void CheatsSerialise(DataSerialiser& ds)
uint64_t countOffset = stream.GetPosition(); uint64_t countOffset = stream.GetPosition();
ds << count; ds << count;
CheatEntrySerialise(ds, CheatType::SandboxMode, gameState.cheats.sandboxMode, count); CheatEntrySerialise(ds, CheatType::sandboxMode, gameState.cheats.sandboxMode, count);
CheatEntrySerialise(ds, CheatType::DisableClearanceChecks, gameState.cheats.disableClearanceChecks, count); CheatEntrySerialise(ds, CheatType::disableClearanceChecks, gameState.cheats.disableClearanceChecks, count);
CheatEntrySerialise(ds, CheatType::DisableSupportLimits, gameState.cheats.disableSupportLimits, count); CheatEntrySerialise(ds, CheatType::disableSupportLimits, gameState.cheats.disableSupportLimits, count);
CheatEntrySerialise(ds, CheatType::ShowAllOperatingModes, gameState.cheats.showAllOperatingModes, count); CheatEntrySerialise(ds, CheatType::showAllOperatingModes, gameState.cheats.showAllOperatingModes, count);
CheatEntrySerialise( CheatEntrySerialise(
ds, CheatType::ShowVehiclesFromOtherTrackTypes, gameState.cheats.showVehiclesFromOtherTrackTypes, count); ds, CheatType::showVehiclesFromOtherTrackTypes, gameState.cheats.showVehiclesFromOtherTrackTypes, count);
CheatEntrySerialise(ds, CheatType::FastLiftHill, gameState.cheats.unlockOperatingLimits, count); CheatEntrySerialise(ds, CheatType::fastLiftHill, gameState.cheats.unlockOperatingLimits, count);
CheatEntrySerialise(ds, CheatType::DisableBrakesFailure, gameState.cheats.disableBrakesFailure, count); CheatEntrySerialise(ds, CheatType::disableBrakesFailure, gameState.cheats.disableBrakesFailure, count);
CheatEntrySerialise(ds, CheatType::DisableAllBreakdowns, gameState.cheats.disableAllBreakdowns, count); CheatEntrySerialise(ds, CheatType::disableAllBreakdowns, gameState.cheats.disableAllBreakdowns, count);
CheatEntrySerialise(ds, CheatType::BuildInPauseMode, gameState.cheats.buildInPauseMode, count); CheatEntrySerialise(ds, CheatType::buildInPauseMode, gameState.cheats.buildInPauseMode, count);
CheatEntrySerialise(ds, CheatType::IgnoreRideIntensity, gameState.cheats.ignoreRideIntensity, count); CheatEntrySerialise(ds, CheatType::ignoreRideIntensity, gameState.cheats.ignoreRideIntensity, count);
CheatEntrySerialise(ds, CheatType::DisableVandalism, gameState.cheats.disableVandalism, count); CheatEntrySerialise(ds, CheatType::disableVandalism, gameState.cheats.disableVandalism, count);
CheatEntrySerialise(ds, CheatType::DisableLittering, gameState.cheats.disableLittering, count); CheatEntrySerialise(ds, CheatType::disableLittering, gameState.cheats.disableLittering, count);
CheatEntrySerialise(ds, CheatType::NeverendingMarketing, gameState.cheats.neverendingMarketing, count); CheatEntrySerialise(ds, CheatType::neverendingMarketing, gameState.cheats.neverendingMarketing, count);
CheatEntrySerialise(ds, CheatType::FreezeWeather, gameState.cheats.freezeWeather, count); CheatEntrySerialise(ds, CheatType::freezeWeather, gameState.cheats.freezeWeather, count);
CheatEntrySerialise(ds, CheatType::DisableTrainLengthLimit, gameState.cheats.disableTrainLengthLimit, count); CheatEntrySerialise(ds, CheatType::disableTrainLengthLimit, gameState.cheats.disableTrainLengthLimit, count);
CheatEntrySerialise(ds, CheatType::DisablePlantAging, gameState.cheats.disablePlantAging, count); CheatEntrySerialise(ds, CheatType::disablePlantAging, gameState.cheats.disablePlantAging, count);
CheatEntrySerialise(ds, CheatType::EnableChainLiftOnAllTrack, gameState.cheats.enableChainLiftOnAllTrack, count); CheatEntrySerialise(ds, CheatType::enableChainLiftOnAllTrack, gameState.cheats.enableChainLiftOnAllTrack, count);
CheatEntrySerialise( CheatEntrySerialise(
ds, CheatType::AllowArbitraryRideTypeChanges, gameState.cheats.allowArbitraryRideTypeChanges, count); ds, CheatType::allowArbitraryRideTypeChanges, gameState.cheats.allowArbitraryRideTypeChanges, count);
CheatEntrySerialise(ds, CheatType::DisableRideValueAging, gameState.cheats.disableRideValueAging, count); CheatEntrySerialise(ds, CheatType::disableRideValueAging, gameState.cheats.disableRideValueAging, count);
CheatEntrySerialise(ds, CheatType::IgnoreResearchStatus, gameState.cheats.ignoreResearchStatus, count); CheatEntrySerialise(ds, CheatType::ignoreResearchStatus, gameState.cheats.ignoreResearchStatus, count);
CheatEntrySerialise(ds, CheatType::EnableAllDrawableTrackPieces, gameState.cheats.enableAllDrawableTrackPieces, count); CheatEntrySerialise(ds, CheatType::enableAllDrawableTrackPieces, gameState.cheats.enableAllDrawableTrackPieces, count);
CheatEntrySerialise( CheatEntrySerialise(
ds, CheatType::AllowTrackPlaceInvalidHeights, gameState.cheats.allowTrackPlaceInvalidHeights, count); ds, CheatType::allowTrackPlaceInvalidHeights, gameState.cheats.allowTrackPlaceInvalidHeights, count);
CheatEntrySerialise(ds, CheatType::AllowRegularPathAsQueue, gameState.cheats.allowRegularPathAsQueue, count); CheatEntrySerialise(ds, CheatType::allowRegularPathAsQueue, gameState.cheats.allowRegularPathAsQueue, count);
CheatEntrySerialise(ds, CheatType::AllowSpecialColourSchemes, gameState.cheats.allowSpecialColourSchemes, count); CheatEntrySerialise(ds, CheatType::allowSpecialColourSchemes, gameState.cheats.allowSpecialColourSchemes, count);
CheatEntrySerialise(ds, CheatType::MakeDestructible, gameState.cheats.makeAllDestructible, count); CheatEntrySerialise(ds, CheatType::makeDestructible, gameState.cheats.makeAllDestructible, count);
CheatEntrySerialise(ds, CheatType::SetStaffSpeed, gameState.cheats.selectedStaffSpeed, count); CheatEntrySerialise(ds, CheatType::setStaffSpeed, gameState.cheats.selectedStaffSpeed, count);
CheatEntrySerialise(ds, CheatType::IgnorePrice, gameState.cheats.ignorePrice, count); CheatEntrySerialise(ds, CheatType::ignorePrice, gameState.cheats.ignorePrice, count);
CheatEntrySerialise(ds, CheatType::SetForcedParkRating, gameState.cheats.forcedParkRating, count); CheatEntrySerialise(ds, CheatType::setForcedParkRating, gameState.cheats.forcedParkRating, count);
// Remember current position and update count. // Remember current position and update count.
uint64_t endOffset = stream.GetPosition(); uint64_t endOffset = stream.GetPosition();
@@ -138,91 +138,91 @@ void CheatsSerialise(DataSerialiser& ds)
switch (static_cast<CheatType>(type)) switch (static_cast<CheatType>(type))
{ {
case CheatType::SandboxMode: case CheatType::sandboxMode:
ds << gameState.cheats.sandboxMode; ds << gameState.cheats.sandboxMode;
break; break;
case CheatType::DisableClearanceChecks: case CheatType::disableClearanceChecks:
ds << gameState.cheats.disableClearanceChecks; ds << gameState.cheats.disableClearanceChecks;
break; break;
case CheatType::DisableSupportLimits: case CheatType::disableSupportLimits:
ds << gameState.cheats.disableSupportLimits; ds << gameState.cheats.disableSupportLimits;
break; break;
case CheatType::ShowAllOperatingModes: case CheatType::showAllOperatingModes:
ds << gameState.cheats.showAllOperatingModes; ds << gameState.cheats.showAllOperatingModes;
break; break;
case CheatType::ShowVehiclesFromOtherTrackTypes: case CheatType::showVehiclesFromOtherTrackTypes:
ds << gameState.cheats.showVehiclesFromOtherTrackTypes; ds << gameState.cheats.showVehiclesFromOtherTrackTypes;
break; break;
case CheatType::FastLiftHill: case CheatType::fastLiftHill:
ds << gameState.cheats.unlockOperatingLimits; ds << gameState.cheats.unlockOperatingLimits;
break; break;
case CheatType::DisableBrakesFailure: case CheatType::disableBrakesFailure:
ds << gameState.cheats.disableBrakesFailure; ds << gameState.cheats.disableBrakesFailure;
break; break;
case CheatType::DisableAllBreakdowns: case CheatType::disableAllBreakdowns:
ds << gameState.cheats.disableAllBreakdowns; ds << gameState.cheats.disableAllBreakdowns;
break; break;
case CheatType::BuildInPauseMode: case CheatType::buildInPauseMode:
ds << gameState.cheats.buildInPauseMode; ds << gameState.cheats.buildInPauseMode;
break; break;
case CheatType::IgnoreRideIntensity: case CheatType::ignoreRideIntensity:
ds << gameState.cheats.ignoreRideIntensity; ds << gameState.cheats.ignoreRideIntensity;
break; break;
case CheatType::IgnorePrice: case CheatType::ignorePrice:
ds << gameState.cheats.ignorePrice; ds << gameState.cheats.ignorePrice;
break; break;
case CheatType::DisableVandalism: case CheatType::disableVandalism:
ds << gameState.cheats.disableVandalism; ds << gameState.cheats.disableVandalism;
break; break;
case CheatType::DisableLittering: case CheatType::disableLittering:
ds << gameState.cheats.disableLittering; ds << gameState.cheats.disableLittering;
break; break;
case CheatType::NeverendingMarketing: case CheatType::neverendingMarketing:
ds << gameState.cheats.neverendingMarketing; ds << gameState.cheats.neverendingMarketing;
break; break;
case CheatType::FreezeWeather: case CheatType::freezeWeather:
ds << gameState.cheats.freezeWeather; ds << gameState.cheats.freezeWeather;
break; break;
case CheatType::DisableTrainLengthLimit: case CheatType::disableTrainLengthLimit:
ds << gameState.cheats.disableTrainLengthLimit; ds << gameState.cheats.disableTrainLengthLimit;
break; break;
case CheatType::DisablePlantAging: case CheatType::disablePlantAging:
ds << gameState.cheats.disablePlantAging; ds << gameState.cheats.disablePlantAging;
break; break;
case CheatType::EnableChainLiftOnAllTrack: case CheatType::enableChainLiftOnAllTrack:
ds << gameState.cheats.enableChainLiftOnAllTrack; ds << gameState.cheats.enableChainLiftOnAllTrack;
break; break;
case CheatType::AllowArbitraryRideTypeChanges: case CheatType::allowArbitraryRideTypeChanges:
ds << gameState.cheats.allowArbitraryRideTypeChanges; ds << gameState.cheats.allowArbitraryRideTypeChanges;
break; break;
case CheatType::DisableRideValueAging: case CheatType::disableRideValueAging:
ds << gameState.cheats.disableRideValueAging; ds << gameState.cheats.disableRideValueAging;
break; break;
case CheatType::IgnoreResearchStatus: case CheatType::ignoreResearchStatus:
ds << gameState.cheats.ignoreResearchStatus; ds << gameState.cheats.ignoreResearchStatus;
break; break;
case CheatType::EnableAllDrawableTrackPieces: case CheatType::enableAllDrawableTrackPieces:
ds << gameState.cheats.enableAllDrawableTrackPieces; ds << gameState.cheats.enableAllDrawableTrackPieces;
break; break;
case CheatType::AllowTrackPlaceInvalidHeights: case CheatType::allowTrackPlaceInvalidHeights:
ds << gameState.cheats.allowTrackPlaceInvalidHeights; ds << gameState.cheats.allowTrackPlaceInvalidHeights;
break; break;
case CheatType::NoCapOnQueueLengthDummy: case CheatType::noCapOnQueueLengthDummy:
ds << dummyBool; ds << dummyBool;
break; break;
case CheatType::AllowRegularPathAsQueue: case CheatType::allowRegularPathAsQueue:
ds << gameState.cheats.allowRegularPathAsQueue; ds << gameState.cheats.allowRegularPathAsQueue;
break; break;
case CheatType::AllowSpecialColourSchemes: case CheatType::allowSpecialColourSchemes:
ds << gameState.cheats.allowSpecialColourSchemes; ds << gameState.cheats.allowSpecialColourSchemes;
break; break;
case CheatType::MakeDestructible: case CheatType::makeDestructible:
ds << gameState.cheats.makeAllDestructible; ds << gameState.cheats.makeAllDestructible;
break; break;
case CheatType::SetStaffSpeed: case CheatType::setStaffSpeed:
ds << gameState.cheats.selectedStaffSpeed; ds << gameState.cheats.selectedStaffSpeed;
break; break;
case CheatType::SetForcedParkRating: case CheatType::setForcedParkRating:
ds << gameState.cheats.forcedParkRating; ds << gameState.cheats.forcedParkRating;
break; break;
default: default:
@@ -236,105 +236,105 @@ const char* CheatsGetName(CheatType cheatType)
{ {
switch (cheatType) switch (cheatType)
{ {
case CheatType::SandboxMode: case CheatType::sandboxMode:
return LanguageGetString(STR_CHEAT_SANDBOX_MODE); return LanguageGetString(STR_CHEAT_SANDBOX_MODE);
case CheatType::DisableClearanceChecks: case CheatType::disableClearanceChecks:
return LanguageGetString(STR_DISABLE_CLEARANCE_CHECKS); return LanguageGetString(STR_DISABLE_CLEARANCE_CHECKS);
case CheatType::DisableSupportLimits: case CheatType::disableSupportLimits:
return LanguageGetString(STR_DISABLE_SUPPORT_LIMITS); return LanguageGetString(STR_DISABLE_SUPPORT_LIMITS);
case CheatType::ShowAllOperatingModes: case CheatType::showAllOperatingModes:
return LanguageGetString(STR_CHEAT_SHOW_ALL_OPERATING_MODES); return LanguageGetString(STR_CHEAT_SHOW_ALL_OPERATING_MODES);
case CheatType::ShowVehiclesFromOtherTrackTypes: case CheatType::showVehiclesFromOtherTrackTypes:
return LanguageGetString(STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES); return LanguageGetString(STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES);
case CheatType::FastLiftHill: case CheatType::fastLiftHill:
return LanguageGetString(STR_CHEAT_UNLOCK_OPERATING_LIMITS); return LanguageGetString(STR_CHEAT_UNLOCK_OPERATING_LIMITS);
case CheatType::DisableBrakesFailure: case CheatType::disableBrakesFailure:
return LanguageGetString(STR_CHEAT_DISABLE_BRAKES_FAILURE); return LanguageGetString(STR_CHEAT_DISABLE_BRAKES_FAILURE);
case CheatType::DisableAllBreakdowns: case CheatType::disableAllBreakdowns:
return LanguageGetString(STR_CHEAT_DISABLE_BREAKDOWNS); return LanguageGetString(STR_CHEAT_DISABLE_BREAKDOWNS);
case CheatType::DisableTrainLengthLimit: case CheatType::disableTrainLengthLimit:
return LanguageGetString(STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT); return LanguageGetString(STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT);
case CheatType::EnableChainLiftOnAllTrack: case CheatType::enableChainLiftOnAllTrack:
return LanguageGetString(STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK); return LanguageGetString(STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK);
case CheatType::BuildInPauseMode: case CheatType::buildInPauseMode:
return LanguageGetString(STR_CHEAT_BUILD_IN_PAUSE_MODE); return LanguageGetString(STR_CHEAT_BUILD_IN_PAUSE_MODE);
case CheatType::IgnoreRideIntensity: case CheatType::ignoreRideIntensity:
return LanguageGetString(STR_CHEAT_IGNORE_INTENSITY); return LanguageGetString(STR_CHEAT_IGNORE_INTENSITY);
case CheatType::IgnorePrice: case CheatType::ignorePrice:
return LanguageGetString(STR_CHEAT_IGNORE_PRICE); return LanguageGetString(STR_CHEAT_IGNORE_PRICE);
case CheatType::DisableVandalism: case CheatType::disableVandalism:
return LanguageGetString(STR_CHEAT_DISABLE_VANDALISM); return LanguageGetString(STR_CHEAT_DISABLE_VANDALISM);
case CheatType::DisableLittering: case CheatType::disableLittering:
return LanguageGetString(STR_CHEAT_DISABLE_LITTERING); return LanguageGetString(STR_CHEAT_DISABLE_LITTERING);
case CheatType::NoMoney: case CheatType::noMoney:
return LanguageGetString(STR_MAKE_PARK_NO_MONEY); return LanguageGetString(STR_MAKE_PARK_NO_MONEY);
case CheatType::AddMoney: case CheatType::addMoney:
return LanguageGetString(STR_LOG_CHEAT_ADD_MONEY); return LanguageGetString(STR_LOG_CHEAT_ADD_MONEY);
case CheatType::ClearLoan: case CheatType::clearLoan:
return LanguageGetString(STR_CHEAT_CLEAR_LOAN); return LanguageGetString(STR_CHEAT_CLEAR_LOAN);
case CheatType::SetGuestParameter: case CheatType::setGuestParameter:
return LanguageGetString(STR_CHEAT_SET_GUESTS_PARAMETERS); return LanguageGetString(STR_CHEAT_SET_GUESTS_PARAMETERS);
case CheatType::GenerateGuests: case CheatType::generateGuests:
return LanguageGetString(STR_CHEAT_LARGE_TRAM_GUESTS); return LanguageGetString(STR_CHEAT_LARGE_TRAM_GUESTS);
case CheatType::RemoveAllGuests: case CheatType::removeAllGuests:
return LanguageGetString(STR_CHEAT_REMOVE_ALL_GUESTS); return LanguageGetString(STR_CHEAT_REMOVE_ALL_GUESTS);
case CheatType::GiveAllGuests: case CheatType::giveAllGuests:
return LanguageGetString(STR_CHEAT_GIVE_ALL_GUESTS); return LanguageGetString(STR_CHEAT_GIVE_ALL_GUESTS);
case CheatType::SetGrassLength: case CheatType::setGrassLength:
return LanguageGetString(STR_CHEAT_CLEAR_GRASS); return LanguageGetString(STR_CHEAT_CLEAR_GRASS);
case CheatType::WaterPlants: case CheatType::waterPlants:
return LanguageGetString(STR_CHEAT_WATER_PLANTS); return LanguageGetString(STR_CHEAT_WATER_PLANTS);
case CheatType::FixVandalism: case CheatType::fixVandalism:
return LanguageGetString(STR_CHEAT_FIX_VANDALISM); return LanguageGetString(STR_CHEAT_FIX_VANDALISM);
case CheatType::RemoveLitter: case CheatType::removeLitter:
return LanguageGetString(STR_CHEAT_REMOVE_LITTER); return LanguageGetString(STR_CHEAT_REMOVE_LITTER);
case CheatType::DisablePlantAging: case CheatType::disablePlantAging:
return LanguageGetString(STR_CHEAT_DISABLE_PLANT_AGING); return LanguageGetString(STR_CHEAT_DISABLE_PLANT_AGING);
case CheatType::SetStaffSpeed: case CheatType::setStaffSpeed:
return LanguageGetString(STR_CHEAT_STAFF_SPEED); return LanguageGetString(STR_CHEAT_STAFF_SPEED);
case CheatType::RenewRides: case CheatType::renewRides:
return LanguageGetString(STR_CHEAT_RENEW_RIDES); return LanguageGetString(STR_CHEAT_RENEW_RIDES);
case CheatType::MakeDestructible: case CheatType::makeDestructible:
return LanguageGetString(STR_CHEAT_MAKE_DESTRUCTABLE); return LanguageGetString(STR_CHEAT_MAKE_DESTRUCTABLE);
case CheatType::FixRides: case CheatType::fixRides:
return LanguageGetString(STR_CHEAT_FIX_ALL_RIDES); return LanguageGetString(STR_CHEAT_FIX_ALL_RIDES);
case CheatType::ResetCrashStatus: case CheatType::resetCrashStatus:
return LanguageGetString(STR_CHEAT_RESET_CRASH_STATUS); return LanguageGetString(STR_CHEAT_RESET_CRASH_STATUS);
case CheatType::TenMinuteInspections: case CheatType::tenMinuteInspections:
return LanguageGetString(STR_CHEAT_10_MINUTE_INSPECTIONS); return LanguageGetString(STR_CHEAT_10_MINUTE_INSPECTIONS);
case CheatType::WinScenario: case CheatType::winScenario:
return LanguageGetString(STR_CHEAT_WIN_SCENARIO); return LanguageGetString(STR_CHEAT_WIN_SCENARIO);
case CheatType::ForceWeather: case CheatType::forceWeather:
return LanguageGetString(STR_CHANGE_WEATHER); return LanguageGetString(STR_CHANGE_WEATHER);
case CheatType::FreezeWeather: case CheatType::freezeWeather:
return LanguageGetString(STR_CHEAT_FREEZE_WEATHER); return LanguageGetString(STR_CHEAT_FREEZE_WEATHER);
case CheatType::NeverendingMarketing: case CheatType::neverendingMarketing:
return LanguageGetString(STR_CHEAT_NEVERENDING_MARKETING); return LanguageGetString(STR_CHEAT_NEVERENDING_MARKETING);
case CheatType::OpenClosePark: case CheatType::openClosePark:
return LanguageGetString(STR_CHEAT_OPEN_PARK); return LanguageGetString(STR_CHEAT_OPEN_PARK);
case CheatType::HaveFun: case CheatType::haveFun:
return LanguageGetString(STR_CHEAT_HAVE_FUN); return LanguageGetString(STR_CHEAT_HAVE_FUN);
case CheatType::SetForcedParkRating: case CheatType::setForcedParkRating:
return LanguageGetString(STR_FORCE_PARK_RATING); return LanguageGetString(STR_FORCE_PARK_RATING);
case CheatType::AllowArbitraryRideTypeChanges: case CheatType::allowArbitraryRideTypeChanges:
return LanguageGetString(STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES); return LanguageGetString(STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES);
case CheatType::SetMoney: case CheatType::setMoney:
return LanguageGetString(STR_SET_MONEY); return LanguageGetString(STR_SET_MONEY);
case CheatType::OwnAllLand: case CheatType::ownAllLand:
return LanguageGetString(STR_CHEAT_OWN_ALL_LAND); return LanguageGetString(STR_CHEAT_OWN_ALL_LAND);
case CheatType::DisableRideValueAging: case CheatType::disableRideValueAging:
return LanguageGetString(STR_CHEAT_DISABLE_RIDE_VALUE_AGING); return LanguageGetString(STR_CHEAT_DISABLE_RIDE_VALUE_AGING);
case CheatType::IgnoreResearchStatus: case CheatType::ignoreResearchStatus:
return LanguageGetString(STR_CHEAT_IGNORE_RESEARCH_STATUS); return LanguageGetString(STR_CHEAT_IGNORE_RESEARCH_STATUS);
case CheatType::EnableAllDrawableTrackPieces: case CheatType::enableAllDrawableTrackPieces:
return LanguageGetString(STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES); return LanguageGetString(STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES);
case CheatType::AllowTrackPlaceInvalidHeights: case CheatType::allowTrackPlaceInvalidHeights:
return LanguageGetString(STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS); return LanguageGetString(STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS);
case CheatType::AllowRegularPathAsQueue: case CheatType::allowRegularPathAsQueue:
return LanguageGetString(STR_CHEAT_ALLOW_PATH_AS_QUEUE); return LanguageGetString(STR_CHEAT_ALLOW_PATH_AS_QUEUE);
case CheatType::AllowSpecialColourSchemes: case CheatType::allowSpecialColourSchemes:
return LanguageGetString(STR_CHEAT_ALLOW_SPECIAL_COLOUR_SCHEMES); return LanguageGetString(STR_CHEAT_ALLOW_SPECIAL_COLOUR_SCHEMES);
case CheatType::RemoveParkFences: case CheatType::removeParkFences:
return LanguageGetString(STR_CHEAT_REMOVE_PARK_FENCES); return LanguageGetString(STR_CHEAT_REMOVE_PARK_FENCES);
default: default:
return "Unknown Cheat"; return "Unknown Cheat";

View File

@@ -52,61 +52,61 @@ struct CheatsState
enum class CheatType : int32_t enum class CheatType : int32_t
{ {
SandboxMode, sandboxMode,
DisableClearanceChecks, disableClearanceChecks,
DisableSupportLimits, disableSupportLimits,
ShowAllOperatingModes, showAllOperatingModes,
ShowVehiclesFromOtherTrackTypes, showVehiclesFromOtherTrackTypes,
DisableTrainLengthLimit, disableTrainLengthLimit,
EnableChainLiftOnAllTrack, enableChainLiftOnAllTrack,
FastLiftHill, fastLiftHill,
DisableBrakesFailure, disableBrakesFailure,
DisableAllBreakdowns, disableAllBreakdowns,
UnlockAllPrices, unlockAllPrices,
BuildInPauseMode, buildInPauseMode,
IgnoreRideIntensity, ignoreRideIntensity,
DisableVandalism, disableVandalism,
DisableLittering, disableLittering,
NoMoney, noMoney,
AddMoney, addMoney,
SetMoney, setMoney,
ClearLoan, clearLoan,
SetGuestParameter, setGuestParameter,
GenerateGuests, generateGuests,
RemoveAllGuests, removeAllGuests,
GiveAllGuests, giveAllGuests,
SetGrassLength, setGrassLength,
WaterPlants, waterPlants,
DisablePlantAging, disablePlantAging,
FixVandalism, fixVandalism,
RemoveLitter, removeLitter,
SetStaffSpeed, setStaffSpeed,
RenewRides, renewRides,
MakeDestructible, makeDestructible,
FixRides, fixRides,
ResetCrashStatus, resetCrashStatus,
TenMinuteInspections, tenMinuteInspections,
WinScenario, winScenario,
ForceWeather, forceWeather,
FreezeWeather, freezeWeather,
OpenClosePark, openClosePark,
HaveFun, haveFun,
SetForcedParkRating, setForcedParkRating,
NeverendingMarketing, neverendingMarketing,
AllowArbitraryRideTypeChanges, allowArbitraryRideTypeChanges,
OwnAllLand, ownAllLand,
DisableRideValueAging, disableRideValueAging,
IgnoreResearchStatus, ignoreResearchStatus,
EnableAllDrawableTrackPieces, enableAllDrawableTrackPieces,
CreateDucks, createDucks,
RemoveDucks, removeDucks,
AllowTrackPlaceInvalidHeights, allowTrackPlaceInvalidHeights,
NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved noCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved
AllowRegularPathAsQueue, allowRegularPathAsQueue,
AllowSpecialColourSchemes, allowSpecialColourSchemes,
RemoveParkFences, removeParkFences,
IgnorePrice, ignorePrice,
Count, count,
}; };
enum enum

View File

@@ -76,7 +76,7 @@ namespace OpenRCT2::GameActions
Result CheatSetAction::Query(GameState_t& gameState) const Result CheatSetAction::Query(GameState_t& gameState) const
{ {
if (static_cast<uint32_t>(_cheatType) >= static_cast<uint32_t>(CheatType::Count)) if (static_cast<uint32_t>(_cheatType) >= static_cast<uint32_t>(CheatType::count))
{ {
LOG_ERROR("Invalid cheat type %u", _cheatType); LOG_ERROR("Invalid cheat type %u", _cheatType);
return Result(Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE); return Result(Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE);
@@ -108,167 +108,167 @@ namespace OpenRCT2::GameActions
switch (static_cast<CheatType>(_cheatType.id)) switch (static_cast<CheatType>(_cheatType.id))
{ {
case CheatType::SandboxMode: case CheatType::sandboxMode:
gameState.cheats.sandboxMode = _param1 != 0; gameState.cheats.sandboxMode = _param1 != 0;
windowMgr->InvalidateByClass(WindowClass::map); windowMgr->InvalidateByClass(WindowClass::map);
windowMgr->InvalidateByClass(WindowClass::footpath); windowMgr->InvalidateByClass(WindowClass::footpath);
break; break;
case CheatType::DisableClearanceChecks: case CheatType::disableClearanceChecks:
gameState.cheats.disableClearanceChecks = _param1 != 0; gameState.cheats.disableClearanceChecks = _param1 != 0;
// Required to update the clearance checks overlay on the Cheats button. // Required to update the clearance checks overlay on the Cheats button.
windowMgr->InvalidateByClass(WindowClass::topToolbar); windowMgr->InvalidateByClass(WindowClass::topToolbar);
break; break;
case CheatType::DisableSupportLimits: case CheatType::disableSupportLimits:
gameState.cheats.disableSupportLimits = _param1 != 0; gameState.cheats.disableSupportLimits = _param1 != 0;
break; break;
case CheatType::ShowAllOperatingModes: case CheatType::showAllOperatingModes:
gameState.cheats.showAllOperatingModes = _param1 != 0; gameState.cheats.showAllOperatingModes = _param1 != 0;
break; break;
case CheatType::ShowVehiclesFromOtherTrackTypes: case CheatType::showVehiclesFromOtherTrackTypes:
gameState.cheats.showVehiclesFromOtherTrackTypes = _param1 != 0; gameState.cheats.showVehiclesFromOtherTrackTypes = _param1 != 0;
break; break;
case CheatType::FastLiftHill: case CheatType::fastLiftHill:
gameState.cheats.unlockOperatingLimits = _param1 != 0; gameState.cheats.unlockOperatingLimits = _param1 != 0;
break; break;
case CheatType::DisableBrakesFailure: case CheatType::disableBrakesFailure:
gameState.cheats.disableBrakesFailure = _param1 != 0; gameState.cheats.disableBrakesFailure = _param1 != 0;
break; break;
case CheatType::DisableAllBreakdowns: case CheatType::disableAllBreakdowns:
gameState.cheats.disableAllBreakdowns = _param1 != 0; gameState.cheats.disableAllBreakdowns = _param1 != 0;
break; break;
case CheatType::DisableTrainLengthLimit: case CheatType::disableTrainLengthLimit:
gameState.cheats.disableTrainLengthLimit = _param1 != 0; gameState.cheats.disableTrainLengthLimit = _param1 != 0;
break; break;
case CheatType::EnableChainLiftOnAllTrack: case CheatType::enableChainLiftOnAllTrack:
gameState.cheats.enableChainLiftOnAllTrack = _param1 != 0; gameState.cheats.enableChainLiftOnAllTrack = _param1 != 0;
break; break;
case CheatType::BuildInPauseMode: case CheatType::buildInPauseMode:
gameState.cheats.buildInPauseMode = _param1 != 0; gameState.cheats.buildInPauseMode = _param1 != 0;
break; break;
case CheatType::IgnoreRideIntensity: case CheatType::ignoreRideIntensity:
gameState.cheats.ignoreRideIntensity = _param1 != 0; gameState.cheats.ignoreRideIntensity = _param1 != 0;
break; break;
case CheatType::IgnorePrice: case CheatType::ignorePrice:
gameState.cheats.ignorePrice = _param1 != 0; gameState.cheats.ignorePrice = _param1 != 0;
break; break;
case CheatType::DisableVandalism: case CheatType::disableVandalism:
gameState.cheats.disableVandalism = _param1 != 0; gameState.cheats.disableVandalism = _param1 != 0;
break; break;
case CheatType::DisableLittering: case CheatType::disableLittering:
gameState.cheats.disableLittering = _param1 != 0; gameState.cheats.disableLittering = _param1 != 0;
break; break;
case CheatType::NoMoney: case CheatType::noMoney:
SetScenarioNoMoney(gameState, _param1 != 0); SetScenarioNoMoney(gameState, _param1 != 0);
break; break;
case CheatType::AddMoney: case CheatType::addMoney:
AddMoney(_param1); AddMoney(_param1);
break; break;
case CheatType::SetMoney: case CheatType::setMoney:
SetMoney(_param1); SetMoney(_param1);
break; break;
case CheatType::ClearLoan: case CheatType::clearLoan:
ClearLoan(gameState); ClearLoan(gameState);
break; break;
case CheatType::SetGuestParameter: case CheatType::setGuestParameter:
SetGuestParameter(_param1, _param2); SetGuestParameter(_param1, _param2);
break; break;
case CheatType::GenerateGuests: case CheatType::generateGuests:
GenerateGuests(_param1); GenerateGuests(_param1);
break; break;
case CheatType::RemoveAllGuests: case CheatType::removeAllGuests:
RemoveAllGuests(gameState); RemoveAllGuests(gameState);
break; break;
case CheatType::GiveAllGuests: case CheatType::giveAllGuests:
GiveObjectToGuests(_param1); GiveObjectToGuests(_param1);
break; break;
case CheatType::SetGrassLength: case CheatType::setGrassLength:
SetGrassLength(gameState, _param1); SetGrassLength(gameState, _param1);
break; break;
case CheatType::WaterPlants: case CheatType::waterPlants:
WaterPlants(); WaterPlants();
break; break;
case CheatType::FixVandalism: case CheatType::fixVandalism:
FixVandalism(); FixVandalism();
break; break;
case CheatType::RemoveLitter: case CheatType::removeLitter:
RemoveLitter(gameState); RemoveLitter(gameState);
break; break;
case CheatType::DisablePlantAging: case CheatType::disablePlantAging:
gameState.cheats.disablePlantAging = _param1 != 0; gameState.cheats.disablePlantAging = _param1 != 0;
break; break;
case CheatType::SetStaffSpeed: case CheatType::setStaffSpeed:
SetStaffSpeed(_param1); SetStaffSpeed(_param1);
break; break;
case CheatType::RenewRides: case CheatType::renewRides:
RenewRides(gameState); RenewRides(gameState);
break; break;
case CheatType::MakeDestructible: case CheatType::makeDestructible:
gameState.cheats.makeAllDestructible = _param1 != 0; gameState.cheats.makeAllDestructible = _param1 != 0;
windowMgr->InvalidateByClass(WindowClass::ride); windowMgr->InvalidateByClass(WindowClass::ride);
break; break;
case CheatType::FixRides: case CheatType::fixRides:
FixBrokenRides(gameState); FixBrokenRides(gameState);
break; break;
case CheatType::ResetCrashStatus: case CheatType::resetCrashStatus:
ResetRideCrashStatus(gameState); ResetRideCrashStatus(gameState);
break; break;
case CheatType::TenMinuteInspections: case CheatType::tenMinuteInspections:
Set10MinuteInspection(gameState); Set10MinuteInspection(gameState);
break; break;
case CheatType::WinScenario: case CheatType::winScenario:
ScenarioSuccess(gameState); ScenarioSuccess(gameState);
break; break;
case CheatType::ForceWeather: case CheatType::forceWeather:
// Todo - make sure this is safe // Todo - make sure this is safe
ClimateForceWeather(WeatherType{ static_cast<uint8_t>(_param1) }); ClimateForceWeather(WeatherType{ static_cast<uint8_t>(_param1) });
break; break;
case CheatType::FreezeWeather: case CheatType::freezeWeather:
gameState.cheats.freezeWeather = _param1 != 0; gameState.cheats.freezeWeather = _param1 != 0;
break; break;
case CheatType::NeverendingMarketing: case CheatType::neverendingMarketing:
gameState.cheats.neverendingMarketing = _param1 != 0; gameState.cheats.neverendingMarketing = _param1 != 0;
break; break;
case CheatType::OpenClosePark: case CheatType::openClosePark:
ParkSetOpen(!Park::IsOpen(gameState.park), gameState); ParkSetOpen(!Park::IsOpen(gameState.park), gameState);
break; break;
case CheatType::HaveFun: case CheatType::haveFun:
gameState.scenarioOptions.objective.Type = Scenario::ObjectiveType::haveFun; gameState.scenarioOptions.objective.Type = Scenario::ObjectiveType::haveFun;
break; break;
case CheatType::SetForcedParkRating: case CheatType::setForcedParkRating:
Park::SetForcedRating(_param1); Park::SetForcedRating(_param1);
break; break;
case CheatType::AllowArbitraryRideTypeChanges: case CheatType::allowArbitraryRideTypeChanges:
gameState.cheats.allowArbitraryRideTypeChanges = _param1 != 0; gameState.cheats.allowArbitraryRideTypeChanges = _param1 != 0;
windowMgr->InvalidateByClass(WindowClass::ride); windowMgr->InvalidateByClass(WindowClass::ride);
break; break;
case CheatType::OwnAllLand: case CheatType::ownAllLand:
OwnAllLand(); OwnAllLand();
break; break;
case CheatType::DisableRideValueAging: case CheatType::disableRideValueAging:
gameState.cheats.disableRideValueAging = _param1 != 0; gameState.cheats.disableRideValueAging = _param1 != 0;
break; break;
case CheatType::IgnoreResearchStatus: case CheatType::ignoreResearchStatus:
gameState.cheats.ignoreResearchStatus = _param1 != 0; gameState.cheats.ignoreResearchStatus = _param1 != 0;
break; break;
case CheatType::EnableAllDrawableTrackPieces: case CheatType::enableAllDrawableTrackPieces:
gameState.cheats.enableAllDrawableTrackPieces = _param1 != 0; gameState.cheats.enableAllDrawableTrackPieces = _param1 != 0;
break; break;
case CheatType::CreateDucks: case CheatType::createDucks:
CreateDucks(_param1); CreateDucks(_param1);
break; break;
case CheatType::RemoveDucks: case CheatType::removeDucks:
Duck::RemoveAll(); Duck::RemoveAll();
break; break;
case CheatType::AllowTrackPlaceInvalidHeights: case CheatType::allowTrackPlaceInvalidHeights:
gameState.cheats.allowTrackPlaceInvalidHeights = _param1 != 0; gameState.cheats.allowTrackPlaceInvalidHeights = _param1 != 0;
break; break;
case CheatType::AllowRegularPathAsQueue: case CheatType::allowRegularPathAsQueue:
gameState.cheats.allowRegularPathAsQueue = _param1 != 0; gameState.cheats.allowRegularPathAsQueue = _param1 != 0;
break; break;
case CheatType::AllowSpecialColourSchemes: case CheatType::allowSpecialColourSchemes:
gameState.cheats.allowSpecialColourSchemes = static_cast<bool>(_param1); gameState.cheats.allowSpecialColourSchemes = static_cast<bool>(_param1);
break; break;
case CheatType::RemoveParkFences: case CheatType::removeParkFences:
RemoveParkFences(); RemoveParkFences();
break; break;
default: default:
@@ -291,69 +291,69 @@ namespace OpenRCT2::GameActions
{ {
switch (static_cast<CheatType>(_cheatType.id)) switch (static_cast<CheatType>(_cheatType.id))
{ {
case CheatType::SandboxMode: case CheatType::sandboxMode:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableClearanceChecks: case CheatType::disableClearanceChecks:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableSupportLimits: case CheatType::disableSupportLimits:
[[fallthrough]]; [[fallthrough]];
case CheatType::ShowAllOperatingModes: case CheatType::showAllOperatingModes:
[[fallthrough]]; [[fallthrough]];
case CheatType::ShowVehiclesFromOtherTrackTypes: case CheatType::showVehiclesFromOtherTrackTypes:
[[fallthrough]]; [[fallthrough]];
case CheatType::FastLiftHill: case CheatType::fastLiftHill:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableBrakesFailure: case CheatType::disableBrakesFailure:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableAllBreakdowns: case CheatType::disableAllBreakdowns:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableTrainLengthLimit: case CheatType::disableTrainLengthLimit:
[[fallthrough]]; [[fallthrough]];
case CheatType::EnableChainLiftOnAllTrack: case CheatType::enableChainLiftOnAllTrack:
[[fallthrough]]; [[fallthrough]];
case CheatType::BuildInPauseMode: case CheatType::buildInPauseMode:
[[fallthrough]]; [[fallthrough]];
case CheatType::IgnoreRideIntensity: case CheatType::ignoreRideIntensity:
[[fallthrough]]; [[fallthrough]];
case CheatType::IgnorePrice: case CheatType::ignorePrice:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableVandalism: case CheatType::disableVandalism:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableLittering: case CheatType::disableLittering:
[[fallthrough]]; [[fallthrough]];
case CheatType::NoMoney: case CheatType::noMoney:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisablePlantAging: case CheatType::disablePlantAging:
[[fallthrough]]; [[fallthrough]];
case CheatType::FreezeWeather: case CheatType::freezeWeather:
[[fallthrough]]; [[fallthrough]];
case CheatType::NeverendingMarketing: case CheatType::neverendingMarketing:
[[fallthrough]]; [[fallthrough]];
case CheatType::AllowArbitraryRideTypeChanges: case CheatType::allowArbitraryRideTypeChanges:
[[fallthrough]]; [[fallthrough]];
case CheatType::DisableRideValueAging: case CheatType::disableRideValueAging:
[[fallthrough]]; [[fallthrough]];
case CheatType::IgnoreResearchStatus: case CheatType::ignoreResearchStatus:
[[fallthrough]]; [[fallthrough]];
case CheatType::EnableAllDrawableTrackPieces: case CheatType::enableAllDrawableTrackPieces:
[[fallthrough]]; [[fallthrough]];
case CheatType::AllowRegularPathAsQueue: case CheatType::allowRegularPathAsQueue:
[[fallthrough]]; [[fallthrough]];
case CheatType::UnlockAllPrices: case CheatType::unlockAllPrices:
[[fallthrough]]; [[fallthrough]];
case CheatType::MakeDestructible: case CheatType::makeDestructible:
[[fallthrough]]; [[fallthrough]];
case CheatType::AllowSpecialColourSchemes: case CheatType::allowSpecialColourSchemes:
[[fallthrough]]; [[fallthrough]];
case CheatType::AllowTrackPlaceInvalidHeights: case CheatType::allowTrackPlaceInvalidHeights:
[[fallthrough]]; [[fallthrough]];
case CheatType::OpenClosePark: case CheatType::openClosePark:
return { { 0, 1 }, { 0, 0 } }; return { { 0, 1 }, { 0, 0 } };
case CheatType::AddMoney: case CheatType::addMoney:
[[fallthrough]]; [[fallthrough]];
case CheatType::SetMoney: case CheatType::setMoney:
return { { std::numeric_limits<money64>::min(), std::numeric_limits<money64>::max() }, { 0, 0 } }; return { { std::numeric_limits<money64>::min(), std::numeric_limits<money64>::max() }, { 0, 0 } };
case CheatType::SetGuestParameter: case CheatType::setGuestParameter:
switch (_param1) switch (_param1)
{ {
case GUEST_PARAMETER_HAPPINESS: case GUEST_PARAMETER_HAPPINESS:
@@ -382,51 +382,51 @@ namespace OpenRCT2::GameActions
default: default:
return { { 0, 0 }, { 0, 0 } }; return { { 0, 0 }, { 0, 0 } };
} }
case CheatType::GenerateGuests: case CheatType::generateGuests:
return { { 1, 10000 }, { 0, 0 } }; return { { 1, 10000 }, { 0, 0 } };
case CheatType::GiveAllGuests: case CheatType::giveAllGuests:
return { { OBJECT_MONEY, OBJECT_UMBRELLA }, { 0, 0 } }; return { { OBJECT_MONEY, OBJECT_UMBRELLA }, { 0, 0 } };
case CheatType::SetGrassLength: case CheatType::setGrassLength:
return { { 0, 7 }, { 0, 0 } }; return { { 0, 7 }, { 0, 0 } };
case CheatType::SetStaffSpeed: case CheatType::setStaffSpeed:
return { { 0, 255 }, { 0, 0 } }; return { { 0, 255 }, { 0, 0 } };
case CheatType::ForceWeather: case CheatType::forceWeather:
return { { 0, EnumValue(WeatherType::Count) - 1 }, { 0, 0 } }; return { { 0, EnumValue(WeatherType::Count) - 1 }, { 0, 0 } };
case CheatType::SetForcedParkRating: case CheatType::setForcedParkRating:
return { { -1, 999 }, { 0, 0 } }; return { { -1, 999 }, { 0, 0 } };
case CheatType::CreateDucks: case CheatType::createDucks:
return { { 0, 100 }, { 0, 0 } }; return { { 0, 100 }, { 0, 0 } };
case CheatType::RemoveDucks: case CheatType::removeDucks:
[[fallthrough]]; [[fallthrough]];
case CheatType::ClearLoan: case CheatType::clearLoan:
[[fallthrough]]; [[fallthrough]];
case CheatType::RemoveAllGuests: case CheatType::removeAllGuests:
[[fallthrough]]; [[fallthrough]];
case CheatType::OwnAllLand: case CheatType::ownAllLand:
[[fallthrough]]; [[fallthrough]];
case CheatType::WinScenario: case CheatType::winScenario:
[[fallthrough]]; [[fallthrough]];
case CheatType::HaveFun: case CheatType::haveFun:
[[fallthrough]]; [[fallthrough]];
case CheatType::FixVandalism: case CheatType::fixVandalism:
[[fallthrough]]; [[fallthrough]];
case CheatType::WaterPlants: case CheatType::waterPlants:
[[fallthrough]]; [[fallthrough]];
case CheatType::FixRides: case CheatType::fixRides:
[[fallthrough]]; [[fallthrough]];
case CheatType::RenewRides: case CheatType::renewRides:
[[fallthrough]]; [[fallthrough]];
case CheatType::TenMinuteInspections: case CheatType::tenMinuteInspections:
[[fallthrough]]; [[fallthrough]];
case CheatType::ResetCrashStatus: case CheatType::resetCrashStatus:
[[fallthrough]]; [[fallthrough]];
case CheatType::NoCapOnQueueLengthDummy: case CheatType::noCapOnQueueLengthDummy:
[[fallthrough]]; [[fallthrough]];
case CheatType::RemoveLitter: case CheatType::removeLitter:
[[fallthrough]]; [[fallthrough]];
case CheatType::RemoveParkFences: case CheatType::removeParkFences:
return { { 0, 0 }, { 0, 0 } }; return { { 0, 0 }, { 0, 0 } };
case CheatType::Count: case CheatType::count:
break; break;
} }

View File

@@ -18,7 +18,7 @@ namespace OpenRCT2::GameActions
using ParametersRange = std::pair<std::pair<int64_t, int64_t>, std::pair<int64_t, int64_t>>; using ParametersRange = std::pair<std::pair<int64_t, int64_t>, std::pair<int64_t, int64_t>>;
private: private:
Network::CheatType_t _cheatType{ EnumValue(CheatType::Count) }; Network::CheatType_t _cheatType{ EnumValue(CheatType::count) };
int64_t _param1{}; int64_t _param1{};
int64_t _param2{}; int64_t _param2{};

View File

@@ -800,7 +800,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
money64 money = ToMoney64FromGBP(double_val[0]); money64 money = ToMoney64FromGBP(double_val[0]);
if (gameState.park.cash != money) if (gameState.park.cash != money)
{ {
ConsoleSetVariableAction<GameActions::CheatSetAction>(console, varName, CheatType::SetMoney, money); ConsoleSetVariableAction<GameActions::CheatSetAction>(console, varName, CheatType::setMoney, money);
} }
else else
{ {
@@ -888,7 +888,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
} }
else if (varName == "no_money" && InvalidArguments(&invalidArgs, int_valid[0])) else if (varName == "no_money" && InvalidArguments(&invalidArgs, int_valid[0]))
{ {
ConsoleSetVariableAction<GameActions::CheatSetAction>(console, varName, CheatType::NoMoney, int_val[0] != 0); ConsoleSetVariableAction<GameActions::CheatSetAction>(console, varName, CheatType::noMoney, int_val[0] != 0);
} }
else if (varName == "difficult_park_rating" && InvalidArguments(&invalidArgs, int_valid[0])) else if (varName == "difficult_park_rating" && InvalidArguments(&invalidArgs, int_valid[0]))
{ {
@@ -970,7 +970,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
if (gameState.cheats.sandboxMode != (int_val[0] != 0)) if (gameState.cheats.sandboxMode != (int_val[0] != 0))
{ {
ConsoleSetVariableAction<GameActions::CheatSetAction>( ConsoleSetVariableAction<GameActions::CheatSetAction>(
console, varName, CheatType::SandboxMode, int_val[0] != 0); console, varName, CheatType::sandboxMode, int_val[0] != 0);
} }
else else
{ {
@@ -982,7 +982,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
if (gameState.cheats.disableClearanceChecks != (int_val[0] != 0)) if (gameState.cheats.disableClearanceChecks != (int_val[0] != 0))
{ {
ConsoleSetVariableAction<GameActions::CheatSetAction>( ConsoleSetVariableAction<GameActions::CheatSetAction>(
console, varName, CheatType::DisableClearanceChecks, int_val[0] != 0); console, varName, CheatType::disableClearanceChecks, int_val[0] != 0);
} }
else else
{ {
@@ -994,7 +994,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar
if (gameState.cheats.disableSupportLimits != (int_val[0] != 0)) if (gameState.cheats.disableSupportLimits != (int_val[0] != 0))
{ {
ConsoleSetVariableAction<GameActions::CheatSetAction>( ConsoleSetVariableAction<GameActions::CheatSetAction>(
console, varName, CheatType::DisableSupportLimits, int_val[0] != 0); console, varName, CheatType::disableSupportLimits, int_val[0] != 0);
} }
else else
{ {

View File

@@ -395,27 +395,27 @@ static void ApplyOptions(const ScreenshotOptions* options, Viewport& viewport)
if (options->mowed_grass) if (options->mowed_grass)
{ {
CheatsSet(CheatType::SetGrassLength, GRASS_LENGTH_MOWED); CheatsSet(CheatType::setGrassLength, GRASS_LENGTH_MOWED);
} }
if (options->clear_grass || options->tidy_up_park) if (options->clear_grass || options->tidy_up_park)
{ {
CheatsSet(CheatType::SetGrassLength, GRASS_LENGTH_CLEAR_0); CheatsSet(CheatType::setGrassLength, GRASS_LENGTH_CLEAR_0);
} }
if (options->water_plants || options->tidy_up_park) if (options->water_plants || options->tidy_up_park)
{ {
CheatsSet(CheatType::WaterPlants); CheatsSet(CheatType::waterPlants);
} }
if (options->fix_vandalism || options->tidy_up_park) if (options->fix_vandalism || options->tidy_up_park)
{ {
CheatsSet(CheatType::FixVandalism); CheatsSet(CheatType::fixVandalism);
} }
if (options->remove_litter || options->tidy_up_park) if (options->remove_litter || options->tidy_up_park)
{ {
CheatsSet(CheatType::RemoveLitter); CheatsSet(CheatType::removeLitter);
} }
if (options->transparent || Config::Get().general.TransparentScreenshot) if (options->transparent || Config::Get().general.TransparentScreenshot)