1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +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 cheatSetAction = GameActions::CheatSetAction(
CheatType::DisableClearanceChecks, gameState.cheats.disableClearanceChecks ? 0 : 1);
CheatType::disableClearanceChecks, gameState.cheats.disableClearanceChecks ? 0 : 1);
GameActions::Execute(&cheatSetAction, gameState);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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