diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index d91f354187..b2412ca430 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -597,7 +597,7 @@ static void ShortcutDecreaseElementHeight() static void ShortcutToggleClearanceChecks() { auto cheatSetAction = CheatSetAction( - CheatType::DisableClearanceChecks, GetGameState().Cheats.DisableClearanceChecks ? 0 : 1); + CheatType::DisableClearanceChecks, GetGameState().Cheats.disableClearanceChecks ? 0 : 1); GameActions::Execute(&cheatSetAction); } diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index b7d15b726d..54015cd4b3 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -377,7 +377,7 @@ namespace OpenRCT2::Ui else { // FIXME: Why does it *2 the value? - if (!GetGameState().Cheats.SandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 })) + if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 })) { info.interactionType = ViewportInteractionItem::None; return info; @@ -508,7 +508,7 @@ namespace OpenRCT2::Ui return info; } case ViewportInteractionItem::ParkEntrance: - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) break; if (tileElement->GetType() != TileElementType::Entrance) diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 8b06add9be..5469dd4f6a 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -549,10 +549,10 @@ static StringId window_cheats_page_titles[] = { { auto ft = Formatter::Common(); ft.Add(1000.00_GBP); - SetCheckboxValue(WIDX_GUEST_IGNORE_RIDE_INTENSITY, gameState.Cheats.IgnoreRideIntensity); - SetCheckboxValue(WIDX_GUEST_IGNORE_PRICE, gameState.Cheats.IgnorePrice); - SetCheckboxValue(WIDX_DISABLE_VANDALISM, gameState.Cheats.DisableVandalism); - SetCheckboxValue(WIDX_DISABLE_LITTERING, gameState.Cheats.DisableLittering); + SetCheckboxValue(WIDX_GUEST_IGNORE_RIDE_INTENSITY, gameState.Cheats.ignoreRideIntensity); + SetCheckboxValue(WIDX_GUEST_IGNORE_PRICE, gameState.Cheats.ignorePrice); + SetCheckboxValue(WIDX_DISABLE_VANDALISM, gameState.Cheats.disableVandalism); + SetCheckboxValue(WIDX_DISABLE_LITTERING, gameState.Cheats.disableLittering); break; } case WINDOW_CHEATS_PAGE_PARK: @@ -561,32 +561,32 @@ static StringId window_cheats_page_titles[] = { widgets[WIDX_OPEN_CLOSE_PARK].text = STR_CHEAT_CLOSE_PARK; SetCheckboxValue(WIDX_FORCE_PARK_RATING, Park::GetForcedRating() >= 0); - SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gameState.Cheats.NeverendingMarketing); - SetCheckboxValue(WIDX_ALLOW_BUILD_IN_PAUSE_MODE, gameState.Cheats.BuildInPauseMode); - SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gameState.Cheats.AllowRegularPathAsQueue); - SetCheckboxValue(WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES, gameState.Cheats.AllowSpecialColourSchemes); + SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gameState.Cheats.neverendingMarketing); + SetCheckboxValue(WIDX_ALLOW_BUILD_IN_PAUSE_MODE, gameState.Cheats.buildInPauseMode); + SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gameState.Cheats.allowRegularPathAsQueue); + SetCheckboxValue(WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES, gameState.Cheats.allowSpecialColourSchemes); break; case WINDOW_CHEATS_PAGE_RIDES: - SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gameState.Cheats.UnlockOperatingLimits); - SetCheckboxValue(WIDX_DISABLE_BRAKES_FAILURE, gameState.Cheats.DisableBrakesFailure); - SetCheckboxValue(WIDX_DISABLE_ALL_BREAKDOWNS, gameState.Cheats.DisableAllBreakdowns); - SetCheckboxValue(WIDX_SHOW_ALL_OPERATING_MODES, gameState.Cheats.ShowAllOperatingModes); + SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gameState.Cheats.unlockOperatingLimits); + SetCheckboxValue(WIDX_DISABLE_BRAKES_FAILURE, gameState.Cheats.disableBrakesFailure); + SetCheckboxValue(WIDX_DISABLE_ALL_BREAKDOWNS, gameState.Cheats.disableAllBreakdowns); + SetCheckboxValue(WIDX_SHOW_ALL_OPERATING_MODES, gameState.Cheats.showAllOperatingModes); SetCheckboxValue( - WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES, gameState.Cheats.ShowVehiclesFromOtherTrackTypes); - SetCheckboxValue(WIDX_DISABLE_TRAIN_LENGTH_LIMITS, gameState.Cheats.DisableTrainLengthLimit); - SetCheckboxValue(WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, gameState.Cheats.EnableChainLiftOnAllTrack); - SetCheckboxValue(WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES, gameState.Cheats.AllowArbitraryRideTypeChanges); - SetCheckboxValue(WIDX_DISABLE_RIDE_VALUE_AGING, gameState.Cheats.DisableRideValueAging); - SetCheckboxValue(WIDX_IGNORE_RESEARCH_STATUS, gameState.Cheats.IgnoreResearchStatus); - SetCheckboxValue(WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES, gameState.Cheats.EnableAllDrawableTrackPieces); - SetCheckboxValue(WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, gameState.Cheats.AllowTrackPlaceInvalidHeights); - SetCheckboxValue(WIDX_MAKE_DESTRUCTIBLE, gameState.Cheats.MakeAllDestructible); + WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES, gameState.Cheats.showVehiclesFromOtherTrackTypes); + SetCheckboxValue(WIDX_DISABLE_TRAIN_LENGTH_LIMITS, gameState.Cheats.disableTrainLengthLimit); + SetCheckboxValue(WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, gameState.Cheats.enableChainLiftOnAllTrack); + SetCheckboxValue(WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES, gameState.Cheats.allowArbitraryRideTypeChanges); + SetCheckboxValue(WIDX_DISABLE_RIDE_VALUE_AGING, gameState.Cheats.disableRideValueAging); + SetCheckboxValue(WIDX_IGNORE_RESEARCH_STATUS, gameState.Cheats.ignoreResearchStatus); + SetCheckboxValue(WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES, gameState.Cheats.enableAllDrawableTrackPieces); + SetCheckboxValue(WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, gameState.Cheats.allowTrackPlaceInvalidHeights); + SetCheckboxValue(WIDX_MAKE_DESTRUCTIBLE, gameState.Cheats.makeAllDestructible); break; case WINDOW_CHEATS_PAGE_STAFF: - SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gameState.Cheats.DisablePlantAging); + SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gameState.Cheats.disablePlantAging); break; case WINDOW_CHEATS_PAGE_WEATHER: - SetCheckboxValue(WIDX_FREEZE_WEATHER, gameState.Cheats.FreezeWeather); + SetCheckboxValue(WIDX_FREEZE_WEATHER, gameState.Cheats.freezeWeather); break; } @@ -595,7 +595,7 @@ static StringId window_cheats_page_titles[] = { // Staff speed window_cheats_staff_widgets[WIDX_STAFF_SPEED].text = _staffSpeedNames[EnumValue( - gameState.Cheats.SelectedStaffSpeed)]; + gameState.Cheats.selectedStaffSpeed)]; if (gScreenFlags & SCREEN_FLAGS_EDITOR) { @@ -1007,7 +1007,7 @@ static StringId window_cheats_page_titles[] = { WindowDropdownShowTextCustomWidth( { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 3); - Dropdown::SetChecked(EnumValue(gameState.Cheats.SelectedStaffSpeed), true); + Dropdown::SetChecked(EnumValue(gameState.Cheats.selectedStaffSpeed), true); } } } @@ -1060,7 +1060,7 @@ static StringId window_cheats_page_titles[] = { 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) @@ -1073,13 +1073,13 @@ static StringId window_cheats_page_titles[] = { } 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; } } @@ -1105,7 +1105,7 @@ static StringId window_cheats_page_titles[] = { CheatsSet(CheatType::RemoveLitter); break; case WIDX_DISABLE_PLANT_AGING: - CheatsSet(CheatType::DisablePlantAging, !gameState.Cheats.DisablePlantAging); + CheatsSet(CheatType::DisablePlantAging, !gameState.Cheats.disablePlantAging); break; } } @@ -1116,7 +1116,7 @@ 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); @@ -1141,17 +1141,17 @@ static StringId window_cheats_page_titles[] = { switch (dropdownIndex) { case 0: - gameState.Cheats.SelectedStaffSpeed = StaffSpeedCheat::None; + gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::None; speed = kCheatsStaffNormalSpeed; break; case 1: - gameState.Cheats.SelectedStaffSpeed = StaffSpeedCheat::Frozen; + gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::Frozen; speed = kCheatsStaffFreezeSpeed; break; case 2: - gameState.Cheats.SelectedStaffSpeed = StaffSpeedCheat::Fast; + gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::Fast; speed = kCheatsStaffFastSpeed; } CheatsSet(CheatType::SetStaffSpeed, speed); @@ -1245,16 +1245,16 @@ static StringId window_cheats_page_titles[] = { 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; } } @@ -1268,19 +1268,19 @@ static StringId window_cheats_page_titles[] = { 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); 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); @@ -1290,59 +1290,59 @@ static StringId window_cheats_page_titles[] = { break; case WIDX_SHOW_ALL_OPERATING_MODES: { - if (!gameState.Cheats.ShowAllOperatingModes) + if (!gameState.Cheats.showAllOperatingModes) { 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: { - if (!gameState.Cheats.ShowVehiclesFromOtherTrackTypes) + if (!gameState.Cheats.showVehiclesFromOtherTrackTypes) { 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: { - if (!gameState.Cheats.DisableTrainLengthLimit) + if (!gameState.Cheats.disableTrainLengthLimit) { 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: { - if (!gameState.Cheats.AllowArbitraryRideTypeChanges) + if (!gameState.Cheats.allowArbitraryRideTypeChanges) { 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: { - if (!gameState.Cheats.AllowTrackPlaceInvalidHeights) + if (!gameState.Cheats.allowTrackPlaceInvalidHeights) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::AllowTrackPlaceInvalidHeights, !gameState.Cheats.AllowTrackPlaceInvalidHeights); + CheatsSet(CheatType::AllowTrackPlaceInvalidHeights, !gameState.Cheats.allowTrackPlaceInvalidHeights); } break; } diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 2c6fcd0af0..a541064936 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -498,7 +498,7 @@ static constexpr colour_t kColoursDropdownOrder[] = { { int32_t defaultIndex = -1; - const bool specialColoursEnabled = !alwaysHideSpecialColours && GetGameState().Cheats.AllowSpecialColourSchemes; + const bool specialColoursEnabled = !alwaysHideSpecialColours && GetGameState().Cheats.allowSpecialColourSchemes; auto numColours = specialColoursEnabled ? static_cast(COLOUR_COUNT) : kColourNumNormal; // Set items for (uint64_t i = 0; i < numColours; i++) diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index b6f0a551b6..45e8ec2bd4 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -670,7 +670,7 @@ namespace OpenRCT2::Ui::Windows uint32_t numPathTypes = 0; // If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode); + bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); _dropdownEntries.clear(); std::optional defaultIndex; @@ -688,14 +688,14 @@ namespace OpenRCT2::Ui::Windows } // If regular paths can be used as queue, only hide the path if we’re _not_ looking at a queue, // but the path surface is one. - if (GetGameState().Cheats.AllowRegularPathAsQueue && !showQueues + if (GetGameState().Cheats.allowRegularPathAsQueue && !showQueues && ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) { continue; } // If the cheat is disabled, hide queues from the regular path view and vice versa. else if ( - !GetGameState().Cheats.AllowRegularPathAsQueue + !GetGameState().Cheats.allowRegularPathAsQueue && showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) { continue; @@ -821,7 +821,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); if (info.interactionType != ViewportInteractionItem::None) { - const bool allowInvalidHeights = GetGameState().Cheats.AllowTrackPlaceInvalidHeights; + const bool allowInvalidHeights = GetGameState().Cheats.allowTrackPlaceInvalidHeights; const auto heightStep = kCoordsZStep * (!allowInvalidHeights ? 2 : 1); _footpathPlaceCtrlZ = Floor2(info.Element->GetBaseZ(), heightStep); @@ -854,7 +854,7 @@ namespace OpenRCT2::Ui::Windows _footpathPlaceShiftZ = mainWnd->viewport->zoom.ApplyTo(_footpathPlaceShiftZ); } - const bool allowInvalidHeights = GetGameState().Cheats.AllowTrackPlaceInvalidHeights; + const bool allowInvalidHeights = GetGameState().Cheats.allowTrackPlaceInvalidHeights; const auto heightStep = kCoordsZStep * (!allowInvalidHeights ? 2 : 1); _footpathPlaceShiftZ = Floor2(_footpathPlaceShiftZ, heightStep); @@ -1589,7 +1589,7 @@ namespace OpenRCT2::Ui::Windows void KeyboardShortcutDemolishCurrent() { if (IsWidgetDisabled(WIDX_REMOVE) || widgets[WIDX_REMOVE].type == WindowWidgetType::Empty - || (!GetGameState().Cheats.BuildInPauseMode && GameIsPaused())) + || (!GetGameState().Cheats.buildInPauseMode && GameIsPaused())) { return; } diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index 2d85fb0190..e509ee5cf1 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -98,7 +98,7 @@ namespace OpenRCT2::Ui::Windows bool IsOwnershipMode() const { - return (gScreenFlags & SCREEN_FLAGS_EDITOR) != 0 || GetGameState().Cheats.SandboxMode; + return (gScreenFlags & SCREEN_FLAGS_EDITOR) != 0 || GetGameState().Cheats.sandboxMode; } void SwitchToMode(LandRightsMode mode) diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 049532acc7..7cf558b873 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -73,7 +73,7 @@ namespace OpenRCT2::Ui::Windows static bool isEditorOrSandbox() { - return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode; + return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode; } static constexpr StringId WINDOW_TITLE = STR_MAP_LABEL; diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 4d02634b6c..0ffcfd8ab5 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -618,7 +618,7 @@ namespace OpenRCT2::Ui::Windows auto currentRideEntry = GetRideEntryByIndex(rideEntryIndex); // Skip if vehicle type is not invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) { continue; } @@ -680,7 +680,7 @@ namespace OpenRCT2::Ui::Windows for (auto rideEntryIndex : rideEntries) { // Skip if vehicle type is not invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) continue; // Ride entries diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 2cb802cc02..e07b24c4f0 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1708,7 +1708,7 @@ namespace OpenRCT2::Ui::Windows } } } - if (GetGameState().Cheats.AllowArbitraryRideTypeChanges) + if (GetGameState().Cheats.allowArbitraryRideTypeChanges) { minHeight += 15; } @@ -2010,7 +2010,7 @@ namespace OpenRCT2::Ui::Windows const auto& gameState = GetGameState(); const auto& rtd = ride.GetRideTypeDescriptor(); - if (gameState.Cheats.ShowVehiclesFromOtherTrackTypes + if (gameState.Cheats.showVehiclesFromOtherTrackTypes && !( rtd.HasFlag(RtdFlag::isFlatRide) || rtd.specialType == RtdSpecialType::maze || rtd.specialType == RtdSpecialType::miniGolf)) @@ -2051,7 +2051,7 @@ namespace OpenRCT2::Ui::Windows continue; // Skip if vehicle type has not been invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.ignoreResearchStatus) continue; auto name = currentRideEntry->naming.Name; @@ -2339,7 +2339,7 @@ namespace OpenRCT2::Ui::Windows const auto& gameState = GetGameState(); disabled_widgets &= ~((1uLL << WIDX_DEMOLISH) | (1uLL << WIDX_CONSTRUCTION)); if (ride->lifecycle_flags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) - && !gameState.Cheats.MakeAllDestructible) + && !gameState.Cheats.makeAllDestructible) disabled_widgets |= (1uLL << WIDX_DEMOLISH); auto ft = Formatter::Common(); @@ -2378,7 +2378,7 @@ namespace OpenRCT2::Ui::Windows AnchorBorderWidgets(); - const int32_t offset = gameState.Cheats.AllowArbitraryRideTypeChanges ? 15 : 0; + const int32_t offset = gameState.Cheats.allowArbitraryRideTypeChanges ? 15 : 0; // Anchor main page specific widgets widgets[WIDX_VIEWPORT].right = width - 26; widgets[WIDX_VIEWPORT].bottom = height - (14 + offset); @@ -2396,7 +2396,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_RIDE_TYPE_DROPDOWN].top = height - 16; widgets[WIDX_RIDE_TYPE_DROPDOWN].bottom = height - 5; - if (!gameState.Cheats.AllowArbitraryRideTypeChanges) + if (!gameState.Cheats.allowArbitraryRideTypeChanges) { widgets[WIDX_RIDE_TYPE].type = WindowWidgetType::Empty; widgets[WIDX_RIDE_TYPE_DROPDOWN].type = WindowWidgetType::Empty; @@ -2812,7 +2812,7 @@ namespace OpenRCT2::Ui::Windows const auto& gameState = GetGameState(); // Trains - if (rideEntry->cars_per_flat_ride > 1 || gameState.Cheats.DisableTrainLengthLimit) + if (rideEntry->cars_per_flat_ride > 1 || gameState.Cheats.disableTrainLengthLimit) { widgets[WIDX_VEHICLE_TRAINS].type = WindowWidgetType::Spinner; widgets[WIDX_VEHICLE_TRAINS_INCREASE].type = WindowWidgetType::Button; @@ -2826,7 +2826,7 @@ namespace OpenRCT2::Ui::Windows } // Cars per train - if (rideEntry->zero_cars + 1 < rideEntry->max_cars_in_train || gameState.Cheats.DisableTrainLengthLimit) + if (rideEntry->zero_cars + 1 < rideEntry->max_cars_in_train || gameState.Cheats.disableTrainLengthLimit) { widgets[WIDX_VEHICLE_CARS_PER_TRAIN].type = WindowWidgetType::Spinner; widgets[WIDX_VEHICLE_CARS_PER_TRAIN_INCREASE].type = WindowWidgetType::Button; @@ -2840,7 +2840,7 @@ namespace OpenRCT2::Ui::Windows } if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::allowReversedTrains) - || (gameState.Cheats.DisableTrainLengthLimit && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide))) + || (gameState.Cheats.disableTrainLengthLimit && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide))) { widgets[WIDX_VEHICLE_REVERSED_TRAINS_CHECKBOX].type = WindowWidgetType::Checkbox; if (ride->HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) @@ -3083,9 +3083,9 @@ namespace OpenRCT2::Ui::Windows const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; const auto& gameState = GetGameState(); uint8_t maxValue = operatingSettings.MaxValue; - uint8_t minValue = gameState.Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; + uint8_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; - if (gameState.Cheats.UnlockOperatingLimits) + if (gameState.Cheats.unlockOperatingLimits) { maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } @@ -3105,8 +3105,8 @@ namespace OpenRCT2::Ui::Windows const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; const auto& gameState = GetGameState(); uint8_t maxValue = operatingSettings.MaxValue; - uint8_t minValue = gameState.Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; - if (gameState.Cheats.UnlockOperatingLimits) + uint8_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; + if (gameState.Cheats.unlockOperatingLimits) { maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } @@ -3243,10 +3243,10 @@ namespace OpenRCT2::Ui::Windows ModeTweakDecrease(); break; case WIDX_LIFT_HILL_SPEED_INCREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits + upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; - lowerBound = GetGameState().Cheats.UnlockOperatingLimits + lowerBound = GetGameState().Cheats.unlockOperatingLimits ? 0 : ride->GetRideTypeDescriptor().LiftData.minimum_speed; SetOperatingSetting( @@ -3254,10 +3254,10 @@ namespace OpenRCT2::Ui::Windows std::clamp(ride->lift_hill_speed + 1, lowerBound, upperBound)); break; case WIDX_LIFT_HILL_SPEED_DECREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits + upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; - lowerBound = GetGameState().Cheats.UnlockOperatingLimits + lowerBound = GetGameState().Cheats.unlockOperatingLimits ? 0 : ride->GetRideTypeDescriptor().LiftData.minimum_speed; SetOperatingSetting( @@ -3305,7 +3305,7 @@ namespace OpenRCT2::Ui::Windows LoadDropdown(&widgets[widgetIndex]); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( @@ -3313,7 +3313,7 @@ namespace OpenRCT2::Ui::Windows std::clamp(ride->num_circuits + 1, lowerBound, upperBound)); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE: - upperBound = GetGameState().Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( @@ -3358,9 +3358,9 @@ namespace OpenRCT2::Ui::Windows const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; const auto& gameState = GetGameState(); - int16_t maxValue = gameState.Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + int16_t maxValue = gameState.Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; - int16_t minValue = gameState.Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; + int16_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; const auto& title = widgets[WIDX_MODE_TWEAK_LABEL].text; Formatter ft; @@ -3441,9 +3441,9 @@ namespace OpenRCT2::Ui::Windows { const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; const auto& gameState = GetGameState(); - uint32_t maxValue = gameState.Cheats.UnlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + uint32_t maxValue = gameState.Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; - uint32_t minValue = gameState.Cheats.UnlockOperatingLimits ? 0 : operatingSettings.MinValue; + uint32_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; auto multiplier = ride->GetRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; try @@ -5108,7 +5108,7 @@ namespace OpenRCT2::Ui::Windows } } - if (GetGameState().Cheats.UnlockOperatingLimits || musicObj->SupportsRideType(ride->type)) + if (GetGameState().Cheats.unlockOperatingLimits || musicObj->SupportsRideType(ride->type)) { musicOrder.push_back(i); } diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index e624a8f4e0..40fd197018 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -425,7 +425,7 @@ namespace OpenRCT2::Ui::Windows } } if (currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) - && !GetGameState().Cheats.EnableAllDrawableTrackPieces) + && !GetGameState().Cheats.enableAllDrawableTrackPieces) { // Disable lift hill toggle and banking if current track piece is uphill if (_previousTrackPitchEnd == TrackPitch::Up25 || _previousTrackPitchEnd == TrackPitch::Up60 @@ -748,7 +748,7 @@ namespace OpenRCT2::Ui::Windows { disabledWidgets |= (1uLL << WIDX_SLOPE_DOWN); } - if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.EnableChainLiftOnAllTrack) + if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.enableChainLiftOnAllTrack) { if (_currentTrackPitchEnd != TrackPitch::None && !IsTrackEnabled(TrackGroup::liftHillCurve)) { @@ -841,7 +841,7 @@ namespace OpenRCT2::Ui::Windows { if (_currentTrackPitchEnd == TrackPitch::None && _previousTrackRollEnd != TrackRoll::None && (!currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) - || GetGameState().Cheats.EnableAllDrawableTrackPieces)) + || GetGameState().Cheats.enableAllDrawableTrackPieces)) { disabledWidgets &= ~(1uLL << WIDX_SLOPE_UP); } @@ -905,7 +905,7 @@ namespace OpenRCT2::Ui::Windows } // If chain lift cheat is enabled then show the chain lift widget no matter what - if (GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (GetGameState().Cheats.enableChainLiftOnAllTrack) { disabledWidgets &= ~(1uLL << WIDX_CHAIN_LIFT); } @@ -1330,7 +1330,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_CHAIN_LIFT: RideConstructionInvalidateCurrentTrack(); _currentTrackHasLiftHill = !_currentTrackHasLiftHill; - if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.EnableChainLiftOnAllTrack) + if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.enableChainLiftOnAllTrack) _currentTrackAlternative.unset(AlternativeTrackFlag::alternativePieces); _currentTrackPrice = kMoney64Undefined; WindowRideConstructionUpdateActiveElements(); @@ -1383,7 +1383,7 @@ namespace OpenRCT2::Ui::Windows { auto trackSpeedIncrement = kDefaultSpeedIncrement; auto trackSpeedMinimum = kDefaultMinimumSpeed; - if (GetGameState().Cheats.UnlockOperatingLimits) + if (GetGameState().Cheats.unlockOperatingLimits) { trackSpeedMinimum = 0; } @@ -1414,7 +1414,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_O_TRACK: RideConstructionInvalidateCurrentTrack(); _currentTrackAlternative.set(AlternativeTrackFlag::alternativePieces); - if (!GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (!GetGameState().Cheats.enableChainLiftOnAllTrack) _currentTrackHasLiftHill = false; _currentTrackPrice = kMoney64Undefined; WindowRideConstructionUpdateActiveElements(); @@ -1775,13 +1775,13 @@ namespace OpenRCT2::Ui::Windows const auto& gameState = GetGameState(); if (currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) && (_currentTrackPitchEnd == TrackPitch::Up25 || _currentTrackPitchEnd == TrackPitch::Up60) - && !gameState.Cheats.EnableAllDrawableTrackPieces) + && !gameState.Cheats.enableAllDrawableTrackPieces) { _currentTrackHasLiftHill = true; } if ((IsTrackEnabled(TrackGroup::liftHill) && !_currentlySelectedTrack.isTrackType) - || (gameState.Cheats.EnableChainLiftOnAllTrack + || (gameState.Cheats.enableChainLiftOnAllTrack && currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack))) { widgets[WIDX_CHAIN_LIFT].type = WindowWidgetType::FlatBtn; @@ -2479,7 +2479,7 @@ namespace OpenRCT2::Ui::Windows { _currentTrackPitchEnd = slope; _currentTrackPrice = kMoney64Undefined; - if (_rideConstructionState == RideConstructionState::Front && !GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (_rideConstructionState == RideConstructionState::Front && !GetGameState().Cheats.enableChainLiftOnAllTrack) { switch (slope) { @@ -3572,7 +3572,7 @@ namespace OpenRCT2::Ui::Windows // FIX not sure exactly why it starts trial and error place from a lower Z, but it causes issues with disable // clearance - if (!GetGameState().Cheats.DisableClearanceChecks && z > kMinimumLandZ) + if (!GetGameState().Cheats.disableClearanceChecks && z > kMinimumLandZ) { z -= LAND_HEIGHT_STEP; } @@ -4928,7 +4928,7 @@ namespace OpenRCT2::Ui::Windows if (coveredVariant != TrackElemType::None && (availableGroups.get(EnumValue(ted.definition.group)))) { trackType = coveredVariant; - if (!GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (!GetGameState().Cheats.enableChainLiftOnAllTrack) liftHillAndInvertedState.unset(LiftHillAndInverted::liftHill); } } @@ -4978,7 +4978,7 @@ namespace OpenRCT2::Ui::Windows turnOffLiftHill = true; } - if (turnOffLiftHill && !GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (turnOffLiftHill && !GetGameState().Cheats.enableChainLiftOnAllTrack) { liftHillAndInvertedState.unset(LiftHillAndInverted::liftHill); _currentTrackHasLiftHill = false; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 72a51fcb32..958a14e3b8 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -680,7 +680,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type = WindowWidgetType::FlatBtn; } - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) + if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) { widgets[WIDX_RESTRICT_SCENERY].type = WindowWidgetType::Button; if (IsSceneryItemRestricted(tabSelectedScenery)) @@ -2364,7 +2364,7 @@ namespace OpenRCT2::Ui::Windows void Sub6E1F34UpdateScreenCoordsAndButtonsPressed(bool canRaiseItem, ScreenCoordsXY& screenPos) { - if (!canRaiseItem && !GetGameState().Cheats.DisableSupportLimits) + if (!canRaiseItem && !GetGameState().Cheats.disableSupportLimits) { gSceneryCtrlPressed = false; gSceneryShiftPressed = false; diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 319bc78b0b..2641aecd93 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -916,7 +916,7 @@ namespace OpenRCT2::Ui::Windows GfxDrawSprite(dpi, ImageId(SPR_G2_SANDBOX), screenPos); // Draw an overlay if clearance checks are disabled - if (GetGameState().Cheats.DisableClearanceChecks) + if (GetGameState().Cheats.disableClearanceChecks) { auto colour = ColourWithFlags{ COLOUR_DARK_ORANGE }.withFlag(ColourFlag::withOutline, true); DrawTextBasic( @@ -1448,15 +1448,15 @@ namespace OpenRCT2::Ui::Windows } auto& gameState = GetGameState(); - if (gameState.Cheats.SandboxMode) + if (gameState.Cheats.sandboxMode) { Dropdown::SetChecked(DDIDX_ENABLE_SANDBOX_MODE, true); } - if (gameState.Cheats.DisableClearanceChecks) + if (gameState.Cheats.disableClearanceChecks) { Dropdown::SetChecked(DDIDX_DISABLE_CLEARANCE_CHECKS, true); } - if (gameState.Cheats.DisableSupportLimits) + if (gameState.Cheats.disableSupportLimits) { Dropdown::SetChecked(DDIDX_DISABLE_SUPPORT_LIMITS, true); } @@ -1488,13 +1488,13 @@ namespace OpenRCT2::Ui::Windows ContextOpenWindow(WindowClass::EditorObjectiveOptions); 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; } } diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 54ae966d59..a4dad85240 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -207,7 +207,7 @@ namespace OpenRCT2::Ui::Windows } money64 cost = kMoney64Undefined; - if (GameIsNotPaused() || GetGameState().Cheats.BuildInPauseMode) + if (GameIsNotPaused() || GetGameState().Cheats.buildInPauseMode) { ClearProvisional(); auto res = FindValidTrackDesignPlaceHeight(trackLoc, GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST); diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index d84407f232..7427f8931f 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -30,33 +30,33 @@ using namespace OpenRCT2; void CheatsReset() { auto& gameState = GetGameState(); - gameState.Cheats.SandboxMode = false; - gameState.Cheats.DisableClearanceChecks = false; - gameState.Cheats.DisableSupportLimits = false; - gameState.Cheats.ShowAllOperatingModes = false; - gameState.Cheats.ShowVehiclesFromOtherTrackTypes = false; - gameState.Cheats.DisableTrainLengthLimit = false; - gameState.Cheats.EnableChainLiftOnAllTrack = false; - gameState.Cheats.UnlockOperatingLimits = false; - gameState.Cheats.DisableBrakesFailure = false; - gameState.Cheats.DisableAllBreakdowns = false; - gameState.Cheats.BuildInPauseMode = false; - gameState.Cheats.IgnoreRideIntensity = false; - gameState.Cheats.IgnorePrice = false; - gameState.Cheats.DisableVandalism = false; - gameState.Cheats.DisableLittering = false; - gameState.Cheats.NeverendingMarketing = false; - gameState.Cheats.FreezeWeather = false; - gameState.Cheats.DisablePlantAging = false; - gameState.Cheats.AllowArbitraryRideTypeChanges = false; - gameState.Cheats.DisableRideValueAging = false; - gameState.Cheats.IgnoreResearchStatus = false; - gameState.Cheats.EnableAllDrawableTrackPieces = false; - gameState.Cheats.AllowTrackPlaceInvalidHeights = false; - gameState.Cheats.AllowRegularPathAsQueue = false; - gameState.Cheats.AllowSpecialColourSchemes = false; - gameState.Cheats.MakeAllDestructible = false; - gameState.Cheats.SelectedStaffSpeed = StaffSpeedCheat::None; + gameState.Cheats.sandboxMode = false; + gameState.Cheats.disableClearanceChecks = false; + gameState.Cheats.disableSupportLimits = false; + gameState.Cheats.showAllOperatingModes = false; + gameState.Cheats.showVehiclesFromOtherTrackTypes = false; + gameState.Cheats.disableTrainLengthLimit = false; + gameState.Cheats.enableChainLiftOnAllTrack = false; + gameState.Cheats.unlockOperatingLimits = false; + gameState.Cheats.disableBrakesFailure = false; + gameState.Cheats.disableAllBreakdowns = false; + gameState.Cheats.buildInPauseMode = false; + gameState.Cheats.ignoreRideIntensity = false; + gameState.Cheats.ignorePrice = false; + gameState.Cheats.disableVandalism = false; + gameState.Cheats.disableLittering = false; + gameState.Cheats.neverendingMarketing = false; + gameState.Cheats.freezeWeather = false; + gameState.Cheats.disablePlantAging = false; + gameState.Cheats.allowArbitraryRideTypeChanges = false; + gameState.Cheats.disableRideValueAging = false; + gameState.Cheats.ignoreResearchStatus = false; + gameState.Cheats.enableAllDrawableTrackPieces = false; + gameState.Cheats.allowTrackPlaceInvalidHeights = false; + gameState.Cheats.allowRegularPathAsQueue = false; + gameState.Cheats.allowSpecialColourSchemes = false; + gameState.Cheats.makeAllDestructible = false; + gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::None; gameState.Cheats.forcedParkRating = kForcedParkRatingDisabled; } @@ -86,36 +86,36 @@ 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); + 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. @@ -141,88 +141,88 @@ void CheatsSerialise(DataSerialiser& ds) switch (static_cast(type)) { case CheatType::SandboxMode: - ds << gameState.Cheats.SandboxMode; + ds << gameState.Cheats.sandboxMode; break; case CheatType::DisableClearanceChecks: - ds << gameState.Cheats.DisableClearanceChecks; + ds << gameState.Cheats.disableClearanceChecks; break; case CheatType::DisableSupportLimits: - ds << gameState.Cheats.DisableSupportLimits; + ds << gameState.Cheats.disableSupportLimits; break; case CheatType::ShowAllOperatingModes: - ds << gameState.Cheats.ShowAllOperatingModes; + ds << gameState.Cheats.showAllOperatingModes; break; case CheatType::ShowVehiclesFromOtherTrackTypes: - ds << gameState.Cheats.ShowVehiclesFromOtherTrackTypes; + ds << gameState.Cheats.showVehiclesFromOtherTrackTypes; break; case CheatType::FastLiftHill: - ds << gameState.Cheats.UnlockOperatingLimits; + ds << gameState.Cheats.unlockOperatingLimits; break; case CheatType::DisableBrakesFailure: - ds << gameState.Cheats.DisableBrakesFailure; + ds << gameState.Cheats.disableBrakesFailure; break; case CheatType::DisableAllBreakdowns: - ds << gameState.Cheats.DisableAllBreakdowns; + ds << gameState.Cheats.disableAllBreakdowns; break; case CheatType::BuildInPauseMode: - ds << gameState.Cheats.BuildInPauseMode; + ds << gameState.Cheats.buildInPauseMode; break; case CheatType::IgnoreRideIntensity: - ds << gameState.Cheats.IgnoreRideIntensity; + ds << gameState.Cheats.ignoreRideIntensity; break; case CheatType::IgnorePrice: - ds << gameState.Cheats.IgnorePrice; + ds << gameState.Cheats.ignorePrice; break; case CheatType::DisableVandalism: - ds << gameState.Cheats.DisableVandalism; + ds << gameState.Cheats.disableVandalism; break; case CheatType::DisableLittering: - ds << gameState.Cheats.DisableLittering; + ds << gameState.Cheats.disableLittering; break; - case CheatType::NeverEndingMarketing: - ds << gameState.Cheats.NeverendingMarketing; + case CheatType::NeverendingMarketing: + ds << gameState.Cheats.neverendingMarketing; break; case CheatType::FreezeWeather: - ds << gameState.Cheats.FreezeWeather; + ds << gameState.Cheats.freezeWeather; break; case CheatType::DisableTrainLengthLimit: - ds << gameState.Cheats.DisableTrainLengthLimit; + ds << gameState.Cheats.disableTrainLengthLimit; break; case CheatType::DisablePlantAging: - ds << gameState.Cheats.DisablePlantAging; + ds << gameState.Cheats.disablePlantAging; break; case CheatType::EnableChainLiftOnAllTrack: - ds << gameState.Cheats.EnableChainLiftOnAllTrack; + ds << gameState.Cheats.enableChainLiftOnAllTrack; break; case CheatType::AllowArbitraryRideTypeChanges: - ds << gameState.Cheats.AllowArbitraryRideTypeChanges; + ds << gameState.Cheats.allowArbitraryRideTypeChanges; break; case CheatType::DisableRideValueAging: - ds << gameState.Cheats.DisableRideValueAging; + ds << gameState.Cheats.disableRideValueAging; break; case CheatType::IgnoreResearchStatus: - ds << gameState.Cheats.IgnoreResearchStatus; + ds << gameState.Cheats.ignoreResearchStatus; break; case CheatType::EnableAllDrawableTrackPieces: - ds << gameState.Cheats.EnableAllDrawableTrackPieces; + ds << gameState.Cheats.enableAllDrawableTrackPieces; break; case CheatType::AllowTrackPlaceInvalidHeights: - ds << gameState.Cheats.AllowTrackPlaceInvalidHeights; + ds << gameState.Cheats.allowTrackPlaceInvalidHeights; break; case CheatType::NoCapOnQueueLengthDummy: ds << dummyBool; break; case CheatType::AllowRegularPathAsQueue: - ds << gameState.Cheats.AllowRegularPathAsQueue; + ds << gameState.Cheats.allowRegularPathAsQueue; break; case CheatType::AllowSpecialColourSchemes: - ds << gameState.Cheats.AllowSpecialColourSchemes; + ds << gameState.Cheats.allowSpecialColourSchemes; break; case CheatType::MakeDestructible: - ds << gameState.Cheats.MakeAllDestructible; + ds << gameState.Cheats.makeAllDestructible; break; case CheatType::SetStaffSpeed: - ds << gameState.Cheats.SelectedStaffSpeed; + ds << gameState.Cheats.selectedStaffSpeed; break; case CheatType::SetForcedParkRating: ds << gameState.Cheats.forcedParkRating; @@ -309,7 +309,7 @@ const char* CheatsGetName(CheatType cheatType) return LanguageGetString(STR_CHANGE_WEATHER); case CheatType::FreezeWeather: return LanguageGetString(STR_CHEAT_FREEZE_WEATHER); - case CheatType::NeverEndingMarketing: + case CheatType::NeverendingMarketing: return LanguageGetString(STR_CHEAT_NEVERENDING_MARKETING); case CheatType::OpenClosePark: return LanguageGetString(STR_CHEAT_OPEN_PARK); diff --git a/src/openrct2/Cheats.h b/src/openrct2/Cheats.h index 7746d6c00d..bf1539fb30 100644 --- a/src/openrct2/Cheats.h +++ b/src/openrct2/Cheats.h @@ -20,33 +20,33 @@ enum class StaffSpeedCheat struct CheatsState { - bool SandboxMode; - bool DisableClearanceChecks; - bool DisableSupportLimits; - bool ShowAllOperatingModes; - bool ShowVehiclesFromOtherTrackTypes; - bool UnlockOperatingLimits; - bool DisableBrakesFailure; - bool DisableAllBreakdowns; - bool BuildInPauseMode; - bool IgnoreRideIntensity; - bool IgnorePrice; - bool DisableVandalism; - bool DisableLittering; - bool NeverendingMarketing; - bool FreezeWeather; - bool DisableTrainLengthLimit; - bool DisablePlantAging; - bool DisableRideValueAging; - bool EnableChainLiftOnAllTrack; - bool AllowArbitraryRideTypeChanges; - bool IgnoreResearchStatus; - bool EnableAllDrawableTrackPieces; - bool AllowTrackPlaceInvalidHeights; - bool AllowRegularPathAsQueue; - bool AllowSpecialColourSchemes; - bool MakeAllDestructible; - StaffSpeedCheat SelectedStaffSpeed; + bool sandboxMode; + bool disableClearanceChecks; + bool disableSupportLimits; + bool showAllOperatingModes; + bool showVehiclesFromOtherTrackTypes; + bool unlockOperatingLimits; + bool disableBrakesFailure; + bool disableAllBreakdowns; + bool buildInPauseMode; + bool ignoreRideIntensity; + bool ignorePrice; + bool disableVandalism; + bool disableLittering; + bool neverendingMarketing; + bool freezeWeather; + bool disableTrainLengthLimit; + bool disablePlantAging; + bool disableRideValueAging; + bool enableChainLiftOnAllTrack; + bool allowArbitraryRideTypeChanges; + bool ignoreResearchStatus; + bool enableAllDrawableTrackPieces; + bool allowTrackPlaceInvalidHeights; + bool allowRegularPathAsQueue; + bool allowSpecialColourSchemes; + bool makeAllDestructible; + StaffSpeedCheat selectedStaffSpeed; int32_t forcedParkRating; }; @@ -92,7 +92,7 @@ enum class CheatType : int32_t OpenClosePark, HaveFun, SetForcedParkRating, - NeverEndingMarketing, + NeverendingMarketing, AllowArbitraryRideTypeChanges, OwnAllLand, DisableRideValueAging, diff --git a/src/openrct2/actions/CheatSetAction.cpp b/src/openrct2/actions/CheatSetAction.cpp index 3106c75158..cc61d2b555 100644 --- a/src/openrct2/actions/CheatSetAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -107,53 +107,53 @@ GameActions::Result CheatSetAction::Execute() const switch (static_cast(_cheatType.id)) { case CheatType::SandboxMode: - gameState.Cheats.SandboxMode = _param1 != 0; + gameState.Cheats.sandboxMode = _param1 != 0; WindowInvalidateByClass(WindowClass::Map); WindowInvalidateByClass(WindowClass::Footpath); break; case CheatType::DisableClearanceChecks: - gameState.Cheats.DisableClearanceChecks = _param1 != 0; + gameState.Cheats.disableClearanceChecks = _param1 != 0; // Required to update the clearance checks overlay on the Cheats button. WindowInvalidateByClass(WindowClass::TopToolbar); break; case CheatType::DisableSupportLimits: - gameState.Cheats.DisableSupportLimits = _param1 != 0; + gameState.Cheats.disableSupportLimits = _param1 != 0; break; case CheatType::ShowAllOperatingModes: - gameState.Cheats.ShowAllOperatingModes = _param1 != 0; + gameState.Cheats.showAllOperatingModes = _param1 != 0; break; case CheatType::ShowVehiclesFromOtherTrackTypes: - gameState.Cheats.ShowVehiclesFromOtherTrackTypes = _param1 != 0; + gameState.Cheats.showVehiclesFromOtherTrackTypes = _param1 != 0; break; case CheatType::FastLiftHill: - gameState.Cheats.UnlockOperatingLimits = _param1 != 0; + gameState.Cheats.unlockOperatingLimits = _param1 != 0; break; case CheatType::DisableBrakesFailure: - gameState.Cheats.DisableBrakesFailure = _param1 != 0; + gameState.Cheats.disableBrakesFailure = _param1 != 0; break; case CheatType::DisableAllBreakdowns: - gameState.Cheats.DisableAllBreakdowns = _param1 != 0; + gameState.Cheats.disableAllBreakdowns = _param1 != 0; break; case CheatType::DisableTrainLengthLimit: - gameState.Cheats.DisableTrainLengthLimit = _param1 != 0; + gameState.Cheats.disableTrainLengthLimit = _param1 != 0; break; case CheatType::EnableChainLiftOnAllTrack: - gameState.Cheats.EnableChainLiftOnAllTrack = _param1 != 0; + gameState.Cheats.enableChainLiftOnAllTrack = _param1 != 0; break; case CheatType::BuildInPauseMode: - gameState.Cheats.BuildInPauseMode = _param1 != 0; + gameState.Cheats.buildInPauseMode = _param1 != 0; break; case CheatType::IgnoreRideIntensity: - gameState.Cheats.IgnoreRideIntensity = _param1 != 0; + gameState.Cheats.ignoreRideIntensity = _param1 != 0; break; case CheatType::IgnorePrice: - gameState.Cheats.IgnorePrice = _param1 != 0; + gameState.Cheats.ignorePrice = _param1 != 0; break; case CheatType::DisableVandalism: - gameState.Cheats.DisableVandalism = _param1 != 0; + gameState.Cheats.disableVandalism = _param1 != 0; break; case CheatType::DisableLittering: - gameState.Cheats.DisableLittering = _param1 != 0; + gameState.Cheats.disableLittering = _param1 != 0; break; case CheatType::NoMoney: SetScenarioNoMoney(_param1 != 0); @@ -192,7 +192,7 @@ GameActions::Result CheatSetAction::Execute() const RemoveLitter(); break; case CheatType::DisablePlantAging: - gameState.Cheats.DisablePlantAging = _param1 != 0; + gameState.Cheats.disablePlantAging = _param1 != 0; break; case CheatType::SetStaffSpeed: SetStaffSpeed(_param1); @@ -201,7 +201,7 @@ GameActions::Result CheatSetAction::Execute() const RenewRides(); break; case CheatType::MakeDestructible: - gameState.Cheats.MakeAllDestructible = _param1 != 0; + gameState.Cheats.makeAllDestructible = _param1 != 0; WindowInvalidateByClass(WindowClass::Ride); break; case CheatType::FixRides: @@ -221,10 +221,10 @@ GameActions::Result CheatSetAction::Execute() const ClimateForceWeather(WeatherType{ static_cast(_param1) }); break; case CheatType::FreezeWeather: - gameState.Cheats.FreezeWeather = _param1 != 0; + gameState.Cheats.freezeWeather = _param1 != 0; break; - case CheatType::NeverEndingMarketing: - gameState.Cheats.NeverendingMarketing = _param1 != 0; + case CheatType::NeverendingMarketing: + gameState.Cheats.neverendingMarketing = _param1 != 0; break; case CheatType::OpenClosePark: ParkSetOpen(!gameState.Park.IsOpen()); @@ -236,20 +236,20 @@ GameActions::Result CheatSetAction::Execute() const Park::SetForcedRating(_param1); break; case CheatType::AllowArbitraryRideTypeChanges: - gameState.Cheats.AllowArbitraryRideTypeChanges = _param1 != 0; + gameState.Cheats.allowArbitraryRideTypeChanges = _param1 != 0; WindowInvalidateByClass(WindowClass::Ride); break; case CheatType::OwnAllLand: OwnAllLand(); break; case CheatType::DisableRideValueAging: - gameState.Cheats.DisableRideValueAging = _param1 != 0; + gameState.Cheats.disableRideValueAging = _param1 != 0; break; case CheatType::IgnoreResearchStatus: - gameState.Cheats.IgnoreResearchStatus = _param1 != 0; + gameState.Cheats.ignoreResearchStatus = _param1 != 0; break; case CheatType::EnableAllDrawableTrackPieces: - gameState.Cheats.EnableAllDrawableTrackPieces = _param1 != 0; + gameState.Cheats.enableAllDrawableTrackPieces = _param1 != 0; break; case CheatType::CreateDucks: CreateDucks(_param1); @@ -258,13 +258,13 @@ GameActions::Result CheatSetAction::Execute() const Duck::RemoveAll(); break; case CheatType::AllowTrackPlaceInvalidHeights: - gameState.Cheats.AllowTrackPlaceInvalidHeights = _param1 != 0; + gameState.Cheats.allowTrackPlaceInvalidHeights = _param1 != 0; break; case CheatType::AllowRegularPathAsQueue: - gameState.Cheats.AllowRegularPathAsQueue = _param1 != 0; + gameState.Cheats.allowRegularPathAsQueue = _param1 != 0; break; case CheatType::AllowSpecialColourSchemes: - gameState.Cheats.AllowSpecialColourSchemes = static_cast(_param1); + gameState.Cheats.allowSpecialColourSchemes = static_cast(_param1); break; case CheatType::RemoveParkFences: RemoveParkFences(); @@ -326,7 +326,7 @@ ParametersRange CheatSetAction::GetParameterRange(CheatType cheatType) const [[fallthrough]]; case CheatType::FreezeWeather: [[fallthrough]]; - case CheatType::NeverEndingMarketing: + case CheatType::NeverendingMarketing: [[fallthrough]]; case CheatType::AllowArbitraryRideTypeChanges: [[fallthrough]]; diff --git a/src/openrct2/actions/ClearAction.cpp b/src/openrct2/actions/ClearAction.cpp index 662bb77e65..2119c98da7 100644 --- a/src/openrct2/actions/ClearAction.cpp +++ b/src/openrct2/actions/ClearAction.cpp @@ -242,6 +242,6 @@ void ClearAction::ResetClearLargeSceneryFlag() bool ClearAction::MapCanClearAt(const CoordsXY& location) { - return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode + return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode || MapIsLocationOwnedOrHasRights(location); } diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index d175b002ce..8f47b12509 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -61,7 +61,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && !MapIsLocationOwned(_loc)) + if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp index a9cfb875de..61c73ab5f9 100644 --- a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp +++ b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp @@ -53,7 +53,7 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && !MapIsLocationOwned(_loc)) + if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REMOVE_THIS, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp index 77a99bf527..010dd2e406 100644 --- a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp +++ b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp @@ -79,7 +79,7 @@ GameActions::Result FootpathLayoutPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && !MapIsLocationOwned(_loc)) + if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -169,7 +169,7 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::R const auto clearanceData = canBuild.GetData(); gFootpathGroundFlags = clearanceData.GroundFlags; - if (!GetGameState().Cheats.DisableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) + if (!GetGameState().Cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); diff --git a/src/openrct2/actions/FootpathPlaceAction.cpp b/src/openrct2/actions/FootpathPlaceAction.cpp index 5deeeb6ddc..8f93f4b9e7 100644 --- a/src/openrct2/actions/FootpathPlaceAction.cpp +++ b/src/openrct2/actions/FootpathPlaceAction.cpp @@ -87,7 +87,7 @@ GameActions::Result FootpathPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && !MapIsLocationOwned(_loc)) + if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_LAND_NOT_OWNED_BY_PARK); } @@ -144,7 +144,7 @@ GameActions::Result FootpathPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { - if (_direction != INVALID_DIRECTION && !GetGameState().Cheats.DisableClearanceChecks) + if (_direction != INVALID_DIRECTION && !GetGameState().Cheats.disableClearanceChecks) { // It is possible, let's remove walls between the old and new piece of path auto zLow = _loc.z; @@ -324,7 +324,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertQuery(GameActions::Result const auto clearanceData = canBuild.GetData(); gFootpathGroundFlags = clearanceData.GroundFlags; - if (!GetGameState().Cheats.DisableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) + if (!GetGameState().Cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_CANT_BUILD_THIS_UNDERWATER); diff --git a/src/openrct2/actions/FootpathRemoveAction.cpp b/src/openrct2/actions/FootpathRemoveAction.cpp index 39eafb1a58..4454052ea7 100644 --- a/src/openrct2/actions/FootpathRemoveAction.cpp +++ b/src/openrct2/actions/FootpathRemoveAction.cpp @@ -60,7 +60,7 @@ GameActions::Result FootpathRemoveAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && !MapIsLocationOwned(_loc)) + if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result( GameActions::Status::NotOwned, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_LAND_NOT_OWNED_BY_PARK); diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index 5d4dfa72a3..db9abbe56d 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -183,7 +183,7 @@ namespace OpenRCT2::GameActions { if (gGamePaused == 0) return true; - if (GetGameState().Cheats.BuildInPauseMode) + if (GetGameState().Cheats.buildInPauseMode) return true; if (actionFlags & GameActions::Flags::AllowWhilePaused) return true; diff --git a/src/openrct2/actions/LandLowerAction.cpp b/src/openrct2/actions/LandLowerAction.cpp index 7b3cf49f26..4439be05c7 100644 --- a/src/openrct2/actions/LandLowerAction.cpp +++ b/src/openrct2/actions/LandLowerAction.cpp @@ -96,7 +96,7 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/LandRaiseAction.cpp b/src/openrct2/actions/LandRaiseAction.cpp index adae6589b2..99156a1381 100644 --- a/src/openrct2/actions/LandRaiseAction.cpp +++ b/src/openrct2/actions/LandRaiseAction.cpp @@ -97,7 +97,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index c31217efca..a3bcd97382 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -72,7 +72,7 @@ GameActions::Result LandSetHeightAction::Query() const return GameActions::Result(GameActions::Status::Disallowed, STR_NONE, errorMessage); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) { if (!MapIsLocationInPark(_coords)) { @@ -81,7 +81,7 @@ GameActions::Result LandSetHeightAction::Query() const } money64 sceneryRemovalCost = 0; - if (!gameState.Cheats.DisableClearanceChecks) + if (!gameState.Cheats.disableClearanceChecks) { if (gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { @@ -98,7 +98,7 @@ GameActions::Result LandSetHeightAction::Query() const } // Check for ride support limits - if (!gameState.Cheats.DisableSupportLimits) + if (!gameState.Cheats.disableSupportLimits) { errorMessage = CheckRideSupports(); if (errorMessage != STR_NONE) @@ -129,7 +129,7 @@ GameActions::Result LandSetHeightAction::Query() const return res; } - if (!gameState.Cheats.DisableClearanceChecks) + if (!gameState.Cheats.disableClearanceChecks) { uint8_t zCorner = _height; if (_style & kTileSlopeRaisedCornersMask) @@ -162,7 +162,7 @@ GameActions::Result LandSetHeightAction::Execute() const auto surfaceHeight = TileElementHeight(_coords); FootpathRemoveLitter({ _coords, surfaceHeight }); - if (!GetGameState().Cheats.DisableClearanceChecks) + if (!GetGameState().Cheats.disableClearanceChecks) { WallRemoveAt({ _coords, _height * 8 - 16, _height * 8 + 32 }); cost += GetSmallSceneryRemovalCost(); diff --git a/src/openrct2/actions/LandSetRightsAction.cpp b/src/openrct2/actions/LandSetRightsAction.cpp index a6308a903b..152b9d6f75 100644 --- a/src/openrct2/actions/LandSetRightsAction.cpp +++ b/src/openrct2/actions/LandSetRightsAction.cpp @@ -84,7 +84,7 @@ GameActions::Result LandSetRightsAction::QueryExecute(bool isExecuting) const res.Position = centre; res.Expenditure = ExpenditureType::LandPurchase; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_NONE, STR_LAND_NOT_FOR_SALE); } diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index 53f8097c78..91aa584d8e 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -152,7 +152,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const const auto clearanceData = canBuild.GetData(); int32_t tempSceneryGroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); - if (!gameState.Cheats.DisableClearanceChecks) + if (!gameState.Cheats.disableClearanceChecks) { if ((clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER) || (clearanceData.GroundFlags & ELEMENT_IS_UNDERGROUND)) { @@ -175,7 +175,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const } if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !MapIsLocationOwned({ curTile, zLow }) - && !gameState.Cheats.SandboxMode) + && !gameState.Cheats.sandboxMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -297,7 +297,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathRemoveLitter({ curTile, zLow }); - if (!GetGameState().Cheats.DisableClearanceChecks) + if (!GetGameState().Cheats.disableClearanceChecks) { WallRemoveAt({ curTile, zLow, zHigh }); } diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index ad6f412f90..496920d969 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -89,7 +89,7 @@ GameActions::Result LargeSceneryRemoveAction::Query() const auto currentTile = CoordsXYZ{ firstTile.x, firstTile.y, firstTile.z } + currentTileRotatedOffset; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { @@ -169,7 +169,7 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const auto currentTile = CoordsXYZ{ firstTile.x, firstTile.y, firstTile.z } + rotatedCurrentTile; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationOwned({ currentTile.x, currentTile.y, currentTile.z })) { diff --git a/src/openrct2/actions/LargeScenerySetColourAction.cpp b/src/openrct2/actions/LargeScenerySetColourAction.cpp index b5c179fa3c..c4dee96c2e 100644 --- a/src/openrct2/actions/LargeScenerySetColourAction.cpp +++ b/src/openrct2/actions/LargeScenerySetColourAction.cpp @@ -127,7 +127,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) auto rotatedTileCoords = CoordsXYZ{ CoordsXY{ tile.offset }.Rotate(_loc.direction), tile.offset.z }; auto currentTile = CoordsXYZ{ baseTile.x, baseTile.y, baseTile.z } + rotatedTileCoords; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationOwned(currentTile)) { diff --git a/src/openrct2/actions/MazePlaceTrackAction.cpp b/src/openrct2/actions/MazePlaceTrackAction.cpp index 5784aa74b3..36fc6235a1 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/MazePlaceTrackAction.cpp @@ -65,7 +65,7 @@ GameActions::Result MazePlaceTrackAction::Query() const return res; } auto& gameState = GetGameState(); - if (!MapIsLocationOwned(_loc) && !gameState.Cheats.SandboxMode) + if (!MapIsLocationOwned(_loc) && !gameState.Cheats.sandboxMode) { res.Error = GameActions::Status::NotOwned; res.ErrorMessage = STR_LAND_NOT_OWNED_BY_PARK; @@ -90,7 +90,7 @@ GameActions::Result MazePlaceTrackAction::Query() const auto clearanceHeight = _loc.z + MAZE_CLEARANCE_HEIGHT; auto heightDifference = baseHeight - surfaceElement->GetBaseZ(); - if (heightDifference >= 0 && !gameState.Cheats.DisableSupportLimits) + if (heightDifference >= 0 && !gameState.Cheats.disableSupportLimits) { heightDifference /= kCoordsZPerTinyZ; diff --git a/src/openrct2/actions/MazeSetTrackAction.cpp b/src/openrct2/actions/MazeSetTrackAction.cpp index e754f26134..b3d0e0ef17 100644 --- a/src/openrct2/actions/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/MazeSetTrackAction.cpp @@ -101,7 +101,7 @@ GameActions::Result MazeSetTrackAction::Query() const return res; } auto& gameState = GetGameState(); - if (!MapIsLocationOwned(_loc) && !gameState.Cheats.SandboxMode) + if (!MapIsLocationOwned(_loc) && !gameState.Cheats.sandboxMode) { res.Error = GameActions::Status::NotOwned; res.ErrorMessage = STR_LAND_NOT_OWNED_BY_PARK; @@ -126,7 +126,7 @@ GameActions::Result MazeSetTrackAction::Query() const auto clearanceHeight = _loc.z + 32; auto heightDifference = baseHeight - surfaceElement->GetBaseZ(); - if (heightDifference >= 0 && !gameState.Cheats.DisableSupportLimits) + if (heightDifference >= 0 && !gameState.Cheats.disableSupportLimits) { heightDifference /= kCoordsZPerTinyZ; diff --git a/src/openrct2/actions/ParkEntrancePlaceAction.cpp b/src/openrct2/actions/ParkEntrancePlaceAction.cpp index 713d6f647d..a583d4de80 100644 --- a/src/openrct2/actions/ParkEntrancePlaceAction.cpp +++ b/src/openrct2/actions/ParkEntrancePlaceAction.cpp @@ -56,7 +56,7 @@ void ParkEntrancePlaceAction::Serialise(DataSerialiser& stream) GameActions::Result ParkEntrancePlaceAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_CANT_BUILD_THIS_HERE, STR_NONE); } diff --git a/src/openrct2/actions/ParkEntranceRemoveAction.cpp b/src/openrct2/actions/ParkEntranceRemoveAction.cpp index aee81da261..cff3e7a14a 100644 --- a/src/openrct2/actions/ParkEntranceRemoveAction.cpp +++ b/src/openrct2/actions/ParkEntranceRemoveAction.cpp @@ -43,7 +43,7 @@ void ParkEntranceRemoveAction::Serialise(DataSerialiser& stream) GameActions::Result ParkEntranceRemoveAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_CANT_REMOVE_THIS, STR_NONE); } diff --git a/src/openrct2/actions/PeepSpawnPlaceAction.cpp b/src/openrct2/actions/PeepSpawnPlaceAction.cpp index 5e2898a692..62a211955a 100644 --- a/src/openrct2/actions/PeepSpawnPlaceAction.cpp +++ b/src/openrct2/actions/PeepSpawnPlaceAction.cpp @@ -45,7 +45,7 @@ void PeepSpawnPlaceAction::Serialise(DataSerialiser& stream) GameActions::Result PeepSpawnPlaceAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_ERR_CANT_PLACE_PEEP_SPAWN_HERE, STR_NONE); } diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index b5c01e369f..a3b0e9dbd8 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -164,7 +164,7 @@ GameActions::Result RideCreateAction::Execute() const ride->NumTrains = 1; auto& gameState = GetGameState(); - if (gameState.Cheats.DisableTrainLengthLimit) + if (gameState.Cheats.disableTrainLengthLimit) { // Reduce amount of proposed trains to prevent 32 trains from always spawning when limits are disabled if (rideEntry->cars_per_flat_ride == NoFlatRideCars) diff --git a/src/openrct2/actions/RideDemolishAction.cpp b/src/openrct2/actions/RideDemolishAction.cpp index 9ae83fbee3..f97ba1268d 100644 --- a/src/openrct2/actions/RideDemolishAction.cpp +++ b/src/openrct2/actions/RideDemolishAction.cpp @@ -67,7 +67,7 @@ GameActions::Result RideDemolishAction::Query() const if ((ride->lifecycle_flags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) && _modifyType == RIDE_MODIFY_DEMOLISH) - && !GetGameState().Cheats.MakeAllDestructible) + && !GetGameState().Cheats.makeAllDestructible) { return GameActions::Result( GameActions::Status::NoClearance, STR_CANT_DEMOLISH_RIDE, diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp index b10188e9be..bf97fd04b4 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp @@ -102,7 +102,7 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const { return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_OFF_EDGE_OF_MAP); } - if (!GetGameState().Cheats.SandboxMode && !MapIsLocationOwned({ _loc, z })) + if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned({ _loc, z })) { return GameActions::Result(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK); } @@ -173,7 +173,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const auto z = station.GetBaseZ(); if (!(GetFlags() & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && !(GetFlags() & GAME_COMMAND_FLAG_GHOST) - && !GetGameState().Cheats.DisableClearanceChecks) + && !GetGameState().Cheats.disableClearanceChecks) { FootpathRemoveLitter({ _loc, z }); WallRemoveAtZ({ _loc, z }); @@ -236,7 +236,7 @@ GameActions::Result RideEntranceExitPlaceAction::TrackPlaceQuery(const CoordsXYZ const auto errorTitle = isExit ? STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION : STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION; - if (!GetGameState().Cheats.SandboxMode && !MapIsLocationOwned(loc)) + if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned(loc)) { return GameActions::Result(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/RideSetSettingAction.cpp b/src/openrct2/actions/RideSetSettingAction.cpp index 245c1c23e6..437d94bfd5 100644 --- a/src/openrct2/actions/RideSetSettingAction.cpp +++ b/src/openrct2/actions/RideSetSettingAction.cpp @@ -70,7 +70,7 @@ GameActions::Result RideSetSettingAction::Query() const GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_MUST_BE_CLOSED_FIRST); } - if (!RideIsModeValid(*ride) && !GetGameState().Cheats.ShowAllOperatingModes) + if (!RideIsModeValid(*ride) && !GetGameState().Cheats.showAllOperatingModes) { LOG_ERROR("Invalid ride mode: %u", _value); return GameActions::Result( @@ -149,7 +149,7 @@ GameActions::Result RideSetSettingAction::Query() const } break; case RideSetSetting::RideType: - if (!GetGameState().Cheats.AllowArbitraryRideTypeChanges) + if (!GetGameState().Cheats.allowArbitraryRideTypeChanges) { LOG_ERROR("Arbitrary ride type changes not allowed."); return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); @@ -263,15 +263,15 @@ bool RideSetSettingAction::RideIsModeValid(const Ride& ride) const bool RideSetSettingAction::RideIsValidLiftHillSpeed(const Ride& ride) const { auto& gameState = GetGameState(); - int32_t minSpeed = gameState.Cheats.UnlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed; - int32_t maxSpeed = gameState.Cheats.UnlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed; + int32_t minSpeed = gameState.Cheats.unlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed; + int32_t maxSpeed = gameState.Cheats.unlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed; return _value >= minSpeed && _value <= maxSpeed; } bool RideSetSettingAction::RideIsValidNumCircuits() const { int32_t minNumCircuits = 1; - int32_t maxNumCircuits = GetGameState().Cheats.UnlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide; + int32_t maxNumCircuits = GetGameState().Cheats.unlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide; return _value >= minNumCircuits && _value <= maxNumCircuits; } @@ -280,7 +280,7 @@ bool RideSetSettingAction::RideIsValidOperationOption(const Ride& ride) const const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; uint8_t minValue = operatingSettings.MinValue; uint8_t maxValue = operatingSettings.MaxValue; - if (GetGameState().Cheats.UnlockOperatingLimits) + if (GetGameState().Cheats.unlockOperatingLimits) { minValue = 0; maxValue = 255; diff --git a/src/openrct2/actions/RideSetVehicleAction.cpp b/src/openrct2/actions/RideSetVehicleAction.cpp index 3b1d994ad2..b2b66d4549 100644 --- a/src/openrct2/actions/RideSetVehicleAction.cpp +++ b/src/openrct2/actions/RideSetVehicleAction.cpp @@ -159,7 +159,7 @@ GameActions::Result RideSetVehicleAction::Execute() const } uint8_t clampValue = _value; static_assert(sizeof(clampValue) == sizeof(ride->proposed_num_cars_per_train)); - if (!GetGameState().Cheats.DisableTrainLengthLimit) + if (!GetGameState().Cheats.disableTrainLengthLimit) { clampValue = std::clamp(clampValue, rideEntry->min_cars_in_train, rideEntry->max_cars_in_train); } @@ -182,7 +182,7 @@ GameActions::Result RideSetVehicleAction::Execute() const } RideSetVehicleColoursToRandomPreset(*ride, _colour); - if (!GetGameState().Cheats.DisableTrainLengthLimit) + if (!GetGameState().Cheats.disableTrainLengthLimit) { ride->proposed_num_cars_per_train = std::clamp( ride->proposed_num_cars_per_train, rideEntry->min_cars_in_train, rideEntry->max_cars_in_train); @@ -230,7 +230,7 @@ bool RideSetVehicleAction::RideIsVehicleTypeValid(const Ride& ride) const { const auto& rtd = ride.GetRideTypeDescriptor(); - if (gameState.Cheats.ShowVehiclesFromOtherTrackTypes + if (gameState.Cheats.showVehiclesFromOtherTrackTypes && !( ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide) || rtd.specialType == RtdSpecialType::maze || rtd.specialType == RtdSpecialType::miniGolf)) @@ -265,7 +265,7 @@ bool RideSetVehicleAction::RideIsVehicleTypeValid(const Ride& ride) const { if (rideEntryIndex == _value) { - if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.ignoreResearchStatus) { return false; } diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.cpp b/src/openrct2/actions/SmallSceneryPlaceAction.cpp index 8e0a12cffe..a552a43860 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.cpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.cpp @@ -172,7 +172,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } auto& gameState = GetGameState(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode && !MapIsLocationOwned({ _loc.x, _loc.y, targetHeight })) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -180,7 +180,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const auto* surfaceElement = MapGetSurfaceElementAt(_loc); - if (surfaceElement != nullptr && !gameState.Cheats.DisableClearanceChecks && surfaceElement->GetWaterHeight() > 0) + if (surfaceElement != nullptr && !gameState.Cheats.disableClearanceChecks && surfaceElement->GetWaterHeight() > 0) { int32_t water_height = surfaceElement->GetWaterHeight() - 1; if (water_height > targetHeight) @@ -190,7 +190,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } } - if (!gameState.Cheats.DisableClearanceChecks && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE))) + if (!gameState.Cheats.disableClearanceChecks && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE))) { if (isOnWater) { @@ -208,13 +208,13 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } } - if (!gameState.Cheats.DisableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) + if (!gameState.Cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) && !supportsRequired && !isOnWater && surfaceElement != nullptr && (surfaceElement->GetSlope() != kTileSlopeFlat)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LEVEL_LAND_REQUIRED); } - if (!gameState.Cheats.DisableSupportLimits && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) && supportsRequired) + if (!gameState.Cheats.disableSupportLimits && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) && supportsRequired) { if (!isOnWater) { @@ -367,7 +367,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathRemoveLitter({ _loc, targetHeight }); - if (!GetGameState().Cheats.DisableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_NO_WALLS))) + if (!GetGameState().Cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_NO_WALLS))) { WallRemoveAt({ _loc, targetHeight, targetHeight + sceneryEntry->height }); } diff --git a/src/openrct2/actions/SmallSceneryRemoveAction.cpp b/src/openrct2/actions/SmallSceneryRemoveAction.cpp index 443145bbb3..dea1d928b2 100644 --- a/src/openrct2/actions/SmallSceneryRemoveAction.cpp +++ b/src/openrct2/actions/SmallSceneryRemoveAction.cpp @@ -76,7 +76,7 @@ GameActions::Result SmallSceneryRemoveAction::Query() const res.Position = _loc; if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(GetFlags() & GAME_COMMAND_FLAG_GHOST) - && !GetGameState().Cheats.SandboxMode) + && !GetGameState().Cheats.sandboxMode) { // Check if allowed to remove item if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) diff --git a/src/openrct2/actions/SmallScenerySetColourAction.cpp b/src/openrct2/actions/SmallScenerySetColourAction.cpp index 5283e66107..7dae014d62 100644 --- a/src/openrct2/actions/SmallScenerySetColourAction.cpp +++ b/src/openrct2/actions/SmallScenerySetColourAction.cpp @@ -84,7 +84,7 @@ GameActions::Result SmallScenerySetColourAction::QueryExecute(bool isExecuting) return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_OFF_EDGE_OF_MAP); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationOwned(_loc)) { diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 1fb573abd8..fb2bf4e8d5 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -201,7 +201,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->TrousersColour = colour; // Staff energy determines their walking speed - switch (GetGameState().Cheats.SelectedStaffSpeed) + switch (GetGameState().Cheats.selectedStaffSpeed) { case StaffSpeedCheat::None: newPeep->Energy = kCheatsStaffNormalSpeed; diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index 950f291521..41228a9067 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -88,7 +88,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const auto& gameState = GetGameState(); // Do nothing if not in editor, sandbox mode or landscaping is forbidden - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode && (gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES)) { return GameActions::Result( @@ -105,7 +105,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (!LocationValid(coords)) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) { if (!MapIsLocationInPark(coords)) continue; @@ -173,7 +173,7 @@ GameActions::Result SurfaceSetStyleAction::Execute() const if (!LocationValid(coords)) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(coords)) continue; diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index 824f07499e..25234108b9 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -72,7 +72,7 @@ GameActions::Result TrackDesignAction::Query() const { // Force a fallback if the entry is not invented yet a track design of it is selected, // which can happen in select-by-track-type mode - if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) { entryIndex = OBJECT_ENTRY_INDEX_NULL; } @@ -146,7 +146,7 @@ GameActions::Result TrackDesignAction::Execute() const { // Force a fallback if the entry is not invented yet a track design using it is selected. // This can happen on rides with multiple vehicles where some have been invented and some haven’t. - if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) { entryIndex = OBJECT_ENTRY_INDEX_NULL; } diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 500b21416d..cbb5ea7ed2 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -99,7 +99,7 @@ GameActions::Result TrackPlaceAction::Query() const } auto& gameState = GetGameState(); - if (_rideType != ride->type && !gameState.Cheats.AllowArbitraryRideTypeChanges) + if (_rideType != ride->type && !gameState.Cheats.allowArbitraryRideTypeChanges) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); @@ -137,7 +137,7 @@ GameActions::Result TrackPlaceAction::Query() const if (!(GetActionFlags() & GameActions::Flags::AllowWhilePaused)) { - if (GameIsPaused() && !gameState.Cheats.BuildInPauseMode) + if (GameIsPaused() && !gameState.Cheats.buildInPauseMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -167,7 +167,7 @@ GameActions::Result TrackPlaceAction::Query() const } // Backwards steep lift hills are allowed, even on roller coasters that do not support forwards steep lift hills. if (_trackPlaceFlags.has(LiftHillAndInverted::liftHill) && !rtd.SupportsTrackGroup(TrackGroup::liftHillSteep) - && !gameState.Cheats.EnableChainLiftOnAllTrack) + && !gameState.Cheats.enableChainLiftOnAllTrack) { const auto& ted = GetTrackElementDescriptor(_trackType); if (ted.flags & TRACK_ELEM_FLAG_IS_STEEP_UP) @@ -193,7 +193,7 @@ GameActions::Result TrackPlaceAction::Query() const return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!MapIsLocationOwned(tileCoords) && !gameState.Cheats.SandboxMode) + if (!MapIsLocationOwned(tileCoords) && !gameState.Cheats.sandboxMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -209,7 +209,7 @@ GameActions::Result TrackPlaceAction::Query() const STR_TILE_ELEMENT_LIMIT_REACHED); } - if (!gameState.Cheats.AllowTrackPlaceInvalidHeights) + if (!gameState.Cheats.allowTrackPlaceInvalidHeights) { if (ted.flags & TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT) { @@ -312,7 +312,7 @@ GameActions::Result TrackPlaceAction::Query() const } } - if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER && !gameState.Cheats.DisableClearanceChecks) + if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -378,7 +378,7 @@ GameActions::Result TrackPlaceAction::Query() const STR_ERR_SURFACE_ELEMENT_NOT_FOUND); } - if (!gameState.Cheats.DisableSupportLimits) + if (!gameState.Cheats.disableSupportLimits) { int32_t ride_height = clearanceZ - surfaceElement->GetBaseZ(); if (ride_height >= 0) @@ -504,7 +504,7 @@ GameActions::Result TrackPlaceAction::Execute() const } auto& gameState = GetGameState(); - if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.DisableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.disableClearanceChecks) { FootpathRemoveLitter(mapLoc); if (rtd.HasFlag(RtdFlag::noWallsAroundTrack)) @@ -638,7 +638,7 @@ GameActions::Result TrackPlaceAction::Execute() const uint32_t availableDirections = entranceDirections & 0x0F; if (availableDirections != 0) { - if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.DisableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.disableClearanceChecks) { for (int32_t chosenDirection = Numerics::bitScanForward(availableDirections); chosenDirection != -1; chosenDirection = Numerics::bitScanForward(availableDirections)) @@ -680,7 +680,7 @@ GameActions::Result TrackPlaceAction::Execute() const } } - if (!gameState.Cheats.DisableClearanceChecks || !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + if (!gameState.Cheats.disableClearanceChecks || !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathConnectEdges(mapLoc, tileElement, GetFlags()); } @@ -711,7 +711,7 @@ GameActions::Result TrackPlaceAction::Execute() const if (ride->mode == RideMode::PoweredLaunch) { if (rtd.SupportsRideMode(RideMode::PoweredLaunchBlockSectioned) - || GetGameState().Cheats.ShowAllOperatingModes) + || GetGameState().Cheats.showAllOperatingModes) newMode = RideMode::PoweredLaunchBlockSectioned; else newMode = RideMode::PoweredLaunch; diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 4a76c160ab..f0469553ee 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -440,7 +440,7 @@ GameActions::Result TrackRemoveAction::Execute() const InvalidateTestResults(*ride); FootpathQueueChainReset(); - if (!GetGameState().Cheats.DisableClearanceChecks || !(tileElement->IsGhost())) + if (!GetGameState().Cheats.disableClearanceChecks || !(tileElement->IsGhost())) { FootpathRemoveEdgesAt(mapLoc, tileElement); } diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 13918ca308..4e2a8846c7 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -92,7 +92,7 @@ GameActions::Result WallPlaceAction::Query() const auto& gameState = GetGameState(); auto mapSizeMax = GetMapSizeMaxXY(); if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) - && !gameState.Cheats.SandboxMode) + && !gameState.Cheats.sandboxMode) { if (_loc.z == 0) { @@ -151,14 +151,14 @@ GameActions::Result WallPlaceAction::Query() const { uint16_t waterHeight = surfaceElement->GetWaterHeight(); - if (targetHeight < waterHeight && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight < waterHeight && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); } } - if (targetHeight < surfaceElement->GetBaseZ() && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight < surfaceElement->GetBaseZ() && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -171,7 +171,7 @@ GameActions::Result WallPlaceAction::Query() const newBaseHeight += 2; if (surfaceElement->GetSlope() & (1 << newEdge)) { - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -187,7 +187,7 @@ GameActions::Result WallPlaceAction::Query() const if (surfaceElement->GetSlope() & (1 << newEdge)) { newBaseHeight += 2; - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, @@ -202,7 +202,7 @@ GameActions::Result WallPlaceAction::Query() const newEdge = (_edge + 3) & 3; if (surfaceElement->GetSlope() & (1 << newEdge)) { - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -218,7 +218,7 @@ GameActions::Result WallPlaceAction::Query() const if (surfaceElement->GetSlope() & (1 << newEdge)) { newBaseHeight += 2; - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.DisableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, @@ -261,7 +261,7 @@ GameActions::Result WallPlaceAction::Query() const clearanceHeight += wallEntry->height; bool wallAcrossTrack = false; - if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.DisableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.disableClearanceChecks) { auto result = WallCheckObstruction(wallEntry, targetHeight / 8, clearanceHeight, &wallAcrossTrack); if (result.Error != GameActions::Status::Ok) @@ -339,7 +339,7 @@ GameActions::Result WallPlaceAction::Execute() const clearanceHeight += wallEntry->height; bool wallAcrossTrack = false; - if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.DisableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.disableClearanceChecks) { auto result = WallCheckObstruction(wallEntry, targetHeight / kCoordsZStep, clearanceHeight, &wallAcrossTrack); if (result.Error != GameActions::Status::Ok) diff --git a/src/openrct2/actions/WallRemoveAction.cpp b/src/openrct2/actions/WallRemoveAction.cpp index f524c96370..04d03eeeab 100644 --- a/src/openrct2/actions/WallRemoveAction.cpp +++ b/src/openrct2/actions/WallRemoveAction.cpp @@ -51,7 +51,7 @@ GameActions::Result WallRemoveAction::Query() const } const bool isGhost = GetFlags() & GAME_COMMAND_FLAG_GHOST; - if (!isGhost && !(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode + if (!isGhost && !(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_REMOVE_THIS, STR_LAND_NOT_OWNED_BY_PARK); diff --git a/src/openrct2/actions/WallSetColourAction.cpp b/src/openrct2/actions/WallSetColourAction.cpp index 9cbedcc2d3..f5e24fea19 100644 --- a/src/openrct2/actions/WallSetColourAction.cpp +++ b/src/openrct2/actions/WallSetColourAction.cpp @@ -67,7 +67,7 @@ GameActions::Result WallSetColourAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_OFF_EDGE_OF_MAP); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !MapIsLocationInPark(_loc) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !MapIsLocationInPark(_loc) && !GetGameState().Cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_REPAINT_THIS, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/WaterLowerAction.cpp b/src/openrct2/actions/WaterLowerAction.cpp index 9005b0a01f..897d933381 100644 --- a/src/openrct2/actions/WaterLowerAction.cpp +++ b/src/openrct2/actions/WaterLowerAction.cpp @@ -80,7 +80,7 @@ GameActions::Result WaterLowerAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -139,7 +139,7 @@ uint8_t WaterLowerAction::GetLowestHeight(const MapRange& validRange) const { for (int32_t x = validRange.GetLeft(); x <= validRange.GetRight(); x += kCoordsXYStep) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/WaterRaiseAction.cpp b/src/openrct2/actions/WaterRaiseAction.cpp index eede825891..c09e3262d8 100644 --- a/src/openrct2/actions/WaterRaiseAction.cpp +++ b/src/openrct2/actions/WaterRaiseAction.cpp @@ -80,7 +80,7 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -152,7 +152,7 @@ uint16_t WaterRaiseAction::GetHighestHeight(const MapRange& validRange) const { for (int32_t x = validRange.GetLeft(); x <= validRange.GetRight(); x += kCoordsXYStep) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/WaterSetHeightAction.cpp b/src/openrct2/actions/WaterSetHeightAction.cpp index 129d8bc69d..41b6ccef91 100644 --- a/src/openrct2/actions/WaterSetHeightAction.cpp +++ b/src/openrct2/actions/WaterSetHeightAction.cpp @@ -52,7 +52,7 @@ GameActions::Result WaterSetHeightAction::Query() const res.Position = { _coords, _height * kCoordsZStep }; auto& gameState = GetGameState(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode && gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) { return GameActions::Result(GameActions::Status::Disallowed, STR_NONE, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY); @@ -69,7 +69,7 @@ GameActions::Result WaterSetHeightAction::Query() const return GameActions::Result(GameActions::Status::NotOwned, STR_NONE, STR_LAND_NOT_OWNED_BY_PARK); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) { if (!MapIsLocationInPark(_coords)) { @@ -121,7 +121,7 @@ GameActions::Result WaterSetHeightAction::Execute() const int32_t surfaceHeight = TileElementHeight(_coords); FootpathRemoveLitter({ _coords, surfaceHeight }); - if (!GetGameState().Cheats.DisableClearanceChecks) + if (!GetGameState().Cheats.disableClearanceChecks) WallRemoveAtZ({ _coords, surfaceHeight }); SurfaceElement* surfaceElement = MapGetSurfaceElementAt(_coords); diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index e13d43a9ed..5a46a3a0a9 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1592,7 +1592,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) if (Happiness >= 180) itemValue /= 2; } - if (itemValue > (static_cast(ScenarioRand() & 0x07)) && !(GetGameState().Cheats.IgnorePrice)) + if (itemValue > (static_cast(ScenarioRand() & 0x07)) && !(GetGameState().Cheats.ignorePrice)) { // "I'm not paying that much for x" InsertNewThought(shopItemDescriptor.TooMuchThought, ride.id); @@ -2067,7 +2067,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // excitement check and will only do a basic intensity check when they arrive at the ride itself. if (ride.id == GuestHeadingToRideId) { - if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) { PeepRideIsTooIntense(this, ride, peepAtRide); return false; @@ -2094,7 +2094,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // ride intensity check and get me on a sheltered ride! if (!isPrecipitating || !ShouldRideWhileRaining(ride)) { - if (!GetGameState().Cheats.IgnoreRideIntensity) + if (!GetGameState().Cheats.ignoreRideIntensity) { // Intensity calculations. Even though the max intensity can go up to 15, it's capped // at 10.0 (before happiness calculations). A full happiness bar will increase the max @@ -2160,7 +2160,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b return false; } - if (!GetGameState().Cheats.IgnoreRideIntensity) + if (!GetGameState().Cheats.ignoreRideIntensity) { if (ride.max_positive_vertical_g > FIXED_2DP(5, 00) || ride.max_negative_vertical_g < FIXED_2DP(-4, 00) || ride.max_lateral_g > FIXED_2DP(4, 00)) @@ -2183,7 +2183,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // Peeps won't pay more than twice the value of the ride. ridePrice = RideGetPrice(ride); - if ((ridePrice > (value * 2)) && !(gameState.Cheats.IgnorePrice)) + if ((ridePrice > (value * 2)) && !(gameState.Cheats.ignorePrice)) { if (peepAtRide) { @@ -2251,7 +2251,7 @@ bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) // The amount that peeps are willing to pay to use the Toilets scales with their toilet stat. // It effectively has a minimum of $0.10 (due to the check above) and a maximum of $0.60. - if ((RideGetPrice(ride) * 40 > Toilet) && !GetGameState().Cheats.IgnorePrice) + if ((RideGetPrice(ride) * 40 > Toilet) && !GetGameState().Cheats.ignorePrice) { if (peepAtShop) { @@ -2658,7 +2658,7 @@ static bool PeepCheckRidePriceAtEntrance(Guest* peep, const Ride& ride, money64 auto value = ride.value; if (value != RIDE_VALUE_UNDEFINED) { - if (((value * 2) < ridePrice) && !(GetGameState().Cheats.IgnorePrice)) + if (((value * 2) < ridePrice) && !(GetGameState().Cheats.ignorePrice)) { peep->InsertNewThought(PeepThoughtType::BadValue, peep->CurrentRide); PeepUpdateRideAtEntranceTryLeave(peep); @@ -2874,7 +2874,7 @@ static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride) return false; if (!RideHasRatings(ride)) return false; - if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) return false; if (peep->Happiness < 180) return false; @@ -2919,7 +2919,7 @@ static bool PeepReallyLikedRide(Guest* peep, const Ride& ride) return false; if (!RideHasRatings(ride)) return false; - if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.IgnoreRideIntensity) + if (ride.ratings.intensity > RIDE_RATING(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) return false; return true; } @@ -3038,7 +3038,7 @@ static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y if (nearby_music == 1 && num_rubbish < 20) return PeepThoughtType::Music; - if (num_rubbish < 2 && !GetGameState().Cheats.DisableLittering) + if (num_rubbish < 2 && !GetGameState().Cheats.disableLittering) // if disable littering cheat is enabled, peeps will not have the "clean and tidy park" thought return PeepThoughtType::VeryClean; @@ -6218,7 +6218,7 @@ static PathElement* FindBreakableElement(const CoordsXYZ& loc) */ static void PeepUpdateWalkingBreakScenery(Guest* peep) { - if (GetGameState().Cheats.DisableVandalism) + if (GetGameState().Cheats.disableVandalism) return; if (!(peep->PeepFlags & PEEP_FLAGS_ANGRY)) diff --git a/src/openrct2/entity/Litter.cpp b/src/openrct2/entity/Litter.cpp index 3a8d38fe33..34d3f4b7d3 100644 --- a/src/openrct2/entity/Litter.cpp +++ b/src/openrct2/entity/Litter.cpp @@ -52,7 +52,7 @@ static bool IsLocationLitterable(const CoordsXYZ& mapPos) void Litter::Create(const CoordsXYZD& litterPos, Type type) { auto& gameState = GetGameState(); - if (gameState.Cheats.DisableLittering) + if (gameState.Cheats.disableLittering) return; auto offsetLitterPos = litterPos diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 1b4d2a787a..c37be28bc8 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -209,7 +209,7 @@ static int32_t ConsoleCommandRides(InteractiveConsole& console, const arguments_ auto res = SetOperatingSetting(RideId::FromUnderlying(ride_index), RideSetSetting::RideType, type); if (res == kMoney64Undefined) { - if (!GetGameState().Cheats.AllowArbitraryRideTypeChanges) + if (!GetGameState().Cheats.allowArbitraryRideTypeChanges) { console.WriteFormatLine( "That didn't work. Try enabling the 'Allow arbitrary ride type changes' cheat"); @@ -718,15 +718,15 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "cheat_sandbox_mode") { - console.WriteFormatLine("cheat_sandbox_mode %d", GetGameState().Cheats.SandboxMode); + console.WriteFormatLine("cheat_sandbox_mode %d", GetGameState().Cheats.sandboxMode); } else if (argv[0] == "cheat_disable_clearance_checks") { - console.WriteFormatLine("cheat_disable_clearance_checks %d", GetGameState().Cheats.DisableClearanceChecks); + console.WriteFormatLine("cheat_disable_clearance_checks %d", GetGameState().Cheats.disableClearanceChecks); } else if (argv[0] == "cheat_disable_support_limits") { - console.WriteFormatLine("cheat_disable_support_limits %d", GetGameState().Cheats.DisableSupportLimits); + console.WriteFormatLine("cheat_disable_support_limits %d", GetGameState().Cheats.disableSupportLimits); } else if (argv[0] == "current_rotation") { @@ -1109,7 +1109,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "cheat_sandbox_mode" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.SandboxMode != (int_val[0] != 0)) + if (GetGameState().Cheats.sandboxMode != (int_val[0] != 0)) { auto cheatSetAction = CheatSetAction(CheatType::SandboxMode, int_val[0] != 0); cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -1127,7 +1127,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "cheat_disable_clearance_checks" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.DisableClearanceChecks != (int_val[0] != 0)) + if (GetGameState().Cheats.disableClearanceChecks != (int_val[0] != 0)) { auto cheatSetAction = CheatSetAction(CheatType::DisableClearanceChecks, int_val[0] != 0); cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -1145,7 +1145,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& } else if (argv[0] == "cheat_disable_support_limits" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.DisableSupportLimits != (int_val[0] != 0)) + if (GetGameState().Cheats.disableSupportLimits != (int_val[0] != 0)) { auto cheatSetAction = CheatSetAction(CheatType::DisableSupportLimits, int_val[0] != 0); cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 849f3ea48c..a22e23e140 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -113,7 +113,7 @@ void MarketingUpdate() auto& gameState = GetGameState(); - if (gameState.Cheats.NeverendingMarketing) + if (gameState.Cheats.neverendingMarketing) return; for (auto it = gameState.MarketingCampaigns.begin(); it != gameState.MarketingCampaigns.end();) diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index c213f7e5f9..2e7c592256 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -640,7 +640,7 @@ bool SceneryGroupIsInvented(int32_t sgIndex) return true; } - if (GetGameState().Cheats.IgnoreResearchStatus) + if (GetGameState().Cheats.ignoreResearchStatus) { return true; } diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 2eb7285a92..5122c58823 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -247,7 +247,7 @@ static void VirtualFloorGetTileProperties( *tileOwned = MapIsLocationOwned({ loc, height }); - if (GetGameState().Cheats.SandboxMode) + if (GetGameState().Cheats.sandboxMode) *tileOwned = true; // Iterate through the map elements of the current tile to find: diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 81937e7172..37343a9c91 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -1111,7 +1111,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con auto& gameState = GetGameState(); // Draw Peep Spawns - if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gameState.Cheats.SandboxMode) + if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gameState.Cheats.sandboxMode) && session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP) { const CoordsXY& pos = session.MapPosition; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 7212779676..9c5b72ae2c 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -1453,7 +1453,7 @@ static void RideBreakdownUpdate(Ride& ride) // continues. if ((ride.reliability == 0 || static_cast(ScenarioRand() & 0x2FFFFF) <= 1u + kRideInitialReliability - ride.reliability) - && !gameState.Cheats.DisableAllBreakdowns) + && !gameState.Cheats.disableAllBreakdowns) { int32_t breakdownReason = RideGetNewBreakdownProblem(ride); if (breakdownReason != -1) @@ -1511,7 +1511,7 @@ static int32_t RideGetNewBreakdownProblem(const Ride& ride) return -1; // If brakes failure is disabled, also take it out of the equation (see above comment why) - if (GetGameState().Cheats.DisableBrakesFailure) + if (GetGameState().Cheats.disableBrakesFailure) return -1; auto monthsOld = ride.GetAge(); @@ -5108,7 +5108,7 @@ void Ride::UpdateMaxVehicles() } int32_t newCarsPerTrain = std::max(proposed_num_cars_per_train, rideEntry->min_cars_in_train); maxCarsPerTrain = std::max(maxCarsPerTrain, static_cast(rideEntry->min_cars_in_train)); - if (!GetGameState().Cheats.DisableTrainLengthLimit) + if (!GetGameState().Cheats.disableTrainLengthLimit) { newCarsPerTrain = std::min(maxCarsPerTrain, newCarsPerTrain); } @@ -5197,7 +5197,7 @@ void Ride::UpdateMaxVehicles() maxNumTrains = rideEntry->cars_per_flat_ride; } - if (GetGameState().Cheats.DisableTrainLengthLimit) + if (GetGameState().Cheats.disableTrainLengthLimit) { maxNumTrains = OpenRCT2::Limits::kMaxTrainsPerRide; } @@ -5532,7 +5532,7 @@ int32_t RideGetEntryIndex(int32_t rideType, int32_t rideSubType) } // Can happen in select-by-track-type mode - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.IgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) { continue; } @@ -5761,7 +5761,7 @@ void Ride::FormatNameTo(Formatter& ft) const uint64_t Ride::GetAvailableModes() const { - if (GetGameState().Cheats.ShowAllOperatingModes) + if (GetGameState().Cheats.showAllOperatingModes) return AllRideModesAvailable; return GetRideTypeDescriptor().RideModes; @@ -5943,7 +5943,7 @@ ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackEle } } - if (subtype != OBJECT_ENTRY_INDEX_NULL && !GetGameState().Cheats.EnableAllDrawableTrackPieces) + if (subtype != OBJECT_ENTRY_INDEX_NULL && !GetGameState().Cheats.enableAllDrawableTrackPieces) { const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry->flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index ebb333b08e..1dd7978fb8 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -636,7 +636,7 @@ void RideConstructionSetDefaultNextPiece() _previousTrackPitchEnd = slope; _currentTrackHasLiftHill = tileElement->AsTrack()->HasChain() && ((slope != TrackPitch::Down25 && slope != TrackPitch::Down60) - || GetGameState().Cheats.EnableChainLiftOnAllTrack); + || GetGameState().Cheats.enableChainLiftOnAllTrack); break; } case RideConstructionState::Back: @@ -682,7 +682,7 @@ void RideConstructionSetDefaultNextPiece() // Set track slope and lift hill _currentTrackPitchEnd = slope; _previousTrackPitchEnd = slope; - if (!GetGameState().Cheats.EnableChainLiftOnAllTrack) + if (!GetGameState().Cheats.enableChainLiftOnAllTrack) { _currentTrackHasLiftHill = tileElement->AsTrack()->HasChain(); } diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index 0412f2624e..bbba6640a4 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -408,7 +408,7 @@ void UpdateEnabledRideGroups(TrackDrawerDescriptor trackDrawerDescriptor) { trackDrawerDescriptor.Regular.GetAvailableTrackGroups(_enabledRideGroups); - if (!GetGameState().Cheats.EnableAllDrawableTrackPieces) + if (!GetGameState().Cheats.enableAllDrawableTrackPieces) { _enabledRideGroups &= ~_disabledRideGroups; } @@ -422,14 +422,14 @@ void UpdateDisabledRideGroups(const RideTrackGroups& res) void TrackDrawerEntry::GetAvailableTrackGroups(RideTrackGroups& res) const { res = enabledTrackGroups; - if (GetGameState().Cheats.EnableAllDrawableTrackPieces) + if (GetGameState().Cheats.enableAllDrawableTrackPieces) res |= extraTrackGroups; } bool TrackDrawerEntry::SupportsTrackGroup(const TrackGroup trackGroup) const { return enabledTrackGroups.get(EnumValue(trackGroup)) - || (GetGameState().Cheats.EnableAllDrawableTrackPieces && extraTrackGroups.get(EnumValue(trackGroup))); + || (GetGameState().Cheats.enableAllDrawableTrackPieces && extraTrackGroups.get(EnumValue(trackGroup))); } bool TrackDrawerDescriptor::HasCoveredPieces() const diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 7d251e7371..40105e0cee 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -1141,7 +1141,7 @@ static void RideRatingsCalculateValue(Ride& ride) + (((ride.ratings.nausea * ratingsMultipliers.nausea) * 32) >> 15); int32_t monthsOld = 0; - if (!GetGameState().Cheats.DisableRideValueAging) + if (!GetGameState().Cheats.disableRideValueAging) { monthsOld = ride.GetAge(); } diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index f55ceeb5ab..ed61e08155 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -728,7 +728,7 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c { result.Type = obj->GetObjectType(); result.Index = objectMgr.GetLoadedObjectEntryIndex(obj); - if (!GetGameState().Cheats.IgnoreResearchStatus) + if (!GetGameState().Cheats.ignoreResearchStatus) { objectUnavailable = !ResearchIsInvented(result.Type, result.Index); } @@ -1951,7 +1951,7 @@ static bool TrackDesignPlacePreview( { gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } - else if (!RideEntryIsInvented(entry_index) && !GetGameState().Cheats.IgnoreResearchStatus) + else if (!RideEntryIsInvented(entry_index) && !GetGameState().Cheats.ignoreResearchStatus) { gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } diff --git a/src/openrct2/scripting/bindings/game/ScCheats.hpp b/src/openrct2/scripting/bindings/game/ScCheats.hpp index c69a41cb1c..8419b63ee8 100644 --- a/src/openrct2/scripting/bindings/game/ScCheats.hpp +++ b/src/openrct2/scripting/bindings/game/ScCheats.hpp @@ -79,266 +79,266 @@ namespace OpenRCT2::Scripting private: bool allowArbitraryRideTypeChanges_get() { - return GetGameState().Cheats.AllowArbitraryRideTypeChanges; + return GetGameState().Cheats.allowArbitraryRideTypeChanges; } void allowArbitraryRideTypeChanges_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.AllowArbitraryRideTypeChanges = value; + GetGameState().Cheats.allowArbitraryRideTypeChanges = value; } bool allowTrackPlaceInvalidHeights_get() { - return GetGameState().Cheats.AllowTrackPlaceInvalidHeights; + return GetGameState().Cheats.allowTrackPlaceInvalidHeights; } void allowTrackPlaceInvalidHeights_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.AllowTrackPlaceInvalidHeights = value; + GetGameState().Cheats.allowTrackPlaceInvalidHeights = value; } bool buildInPauseMode_get() { - return GetGameState().Cheats.BuildInPauseMode; + return GetGameState().Cheats.buildInPauseMode; } void buildInPauseMode_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.BuildInPauseMode = value; + GetGameState().Cheats.buildInPauseMode = value; } bool disableAllBreakdowns_get() { - return GetGameState().Cheats.DisableAllBreakdowns; + return GetGameState().Cheats.disableAllBreakdowns; } void disableAllBreakdowns_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableAllBreakdowns = value; + GetGameState().Cheats.disableAllBreakdowns = value; } bool disableBrakesFailure_get() { - return GetGameState().Cheats.DisableBrakesFailure; + return GetGameState().Cheats.disableBrakesFailure; } void disableBrakesFailure_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableBrakesFailure = value; + GetGameState().Cheats.disableBrakesFailure = value; } bool disableClearanceChecks_get() { - return GetGameState().Cheats.DisableClearanceChecks; + return GetGameState().Cheats.disableClearanceChecks; } void disableClearanceChecks_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableClearanceChecks = value; + GetGameState().Cheats.disableClearanceChecks = value; } bool disableLittering_get() { - return GetGameState().Cheats.DisableLittering; + return GetGameState().Cheats.disableLittering; } void disableLittering_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableLittering = value; + GetGameState().Cheats.disableLittering = value; } bool disablePlantAging_get() { - return GetGameState().Cheats.DisablePlantAging; + return GetGameState().Cheats.disablePlantAging; } void disablePlantAging_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisablePlantAging = value; + GetGameState().Cheats.disablePlantAging = value; } bool allowRegularPathAsQueue_get() { - return GetGameState().Cheats.AllowRegularPathAsQueue; + return GetGameState().Cheats.allowRegularPathAsQueue; } void allowRegularPathAsQueue_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.AllowRegularPathAsQueue = value; + GetGameState().Cheats.allowRegularPathAsQueue = value; } bool allowSpecialColourSchemes_get() { - return GetGameState().Cheats.AllowSpecialColourSchemes; + return GetGameState().Cheats.allowSpecialColourSchemes; } void allowSpecialColourSchemes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.AllowSpecialColourSchemes = value; + GetGameState().Cheats.allowSpecialColourSchemes = value; } bool disableRideValueAging_get() { - return GetGameState().Cheats.DisableRideValueAging; + return GetGameState().Cheats.disableRideValueAging; } void disableRideValueAging_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableRideValueAging = value; + GetGameState().Cheats.disableRideValueAging = value; } bool disableSupportLimits_get() { - return GetGameState().Cheats.DisableSupportLimits; + return GetGameState().Cheats.disableSupportLimits; } void disableSupportLimits_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableSupportLimits = value; + GetGameState().Cheats.disableSupportLimits = value; } bool disableTrainLengthLimit_get() { - return GetGameState().Cheats.DisableTrainLengthLimit; + return GetGameState().Cheats.disableTrainLengthLimit; } void disableTrainLengthLimit_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableTrainLengthLimit = value; + GetGameState().Cheats.disableTrainLengthLimit = value; } bool disableVandalism_get() { - return GetGameState().Cheats.DisableVandalism; + return GetGameState().Cheats.disableVandalism; } void disableVandalism_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.DisableVandalism = value; + GetGameState().Cheats.disableVandalism = value; } bool enableAllDrawableTrackPieces_get() { - return GetGameState().Cheats.EnableAllDrawableTrackPieces; + return GetGameState().Cheats.enableAllDrawableTrackPieces; } void enableAllDrawableTrackPieces_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.EnableAllDrawableTrackPieces = value; + GetGameState().Cheats.enableAllDrawableTrackPieces = value; } bool enableChainLiftOnAllTrack_get() { - return GetGameState().Cheats.EnableChainLiftOnAllTrack; + return GetGameState().Cheats.enableChainLiftOnAllTrack; } void enableChainLiftOnAllTrack_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.EnableChainLiftOnAllTrack = value; + GetGameState().Cheats.enableChainLiftOnAllTrack = value; } bool fastLiftHill_get() { - return GetGameState().Cheats.UnlockOperatingLimits; + return GetGameState().Cheats.unlockOperatingLimits; } void fastLiftHill_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.UnlockOperatingLimits = value; + GetGameState().Cheats.unlockOperatingLimits = value; } bool freezeWeather_get() { - return GetGameState().Cheats.FreezeWeather; + return GetGameState().Cheats.freezeWeather; } void freezeWeather_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.FreezeWeather = value; + GetGameState().Cheats.freezeWeather = value; } bool ignoreResearchStatus_get() { - return GetGameState().Cheats.IgnoreResearchStatus; + return GetGameState().Cheats.ignoreResearchStatus; } void ignoreResearchStatus_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.IgnoreResearchStatus = value; + GetGameState().Cheats.ignoreResearchStatus = value; } bool ignoreRideIntensity_get() { - return GetGameState().Cheats.IgnoreRideIntensity; + return GetGameState().Cheats.ignoreRideIntensity; } void ignoreRideIntensity_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.IgnoreRideIntensity = value; + GetGameState().Cheats.ignoreRideIntensity = value; } bool neverendingMarketing_get() { - return GetGameState().Cheats.NeverendingMarketing; + return GetGameState().Cheats.neverendingMarketing; } void neverendingMarketing_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.NeverendingMarketing = value; + GetGameState().Cheats.neverendingMarketing = value; } bool sandboxMode_get() { - return GetGameState().Cheats.SandboxMode; + return GetGameState().Cheats.sandboxMode; } void sandboxMode_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.SandboxMode = value; + GetGameState().Cheats.sandboxMode = value; } bool showAllOperatingModes_get() { - return GetGameState().Cheats.ShowAllOperatingModes; + return GetGameState().Cheats.showAllOperatingModes; } void showAllOperatingModes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.ShowAllOperatingModes = value; + GetGameState().Cheats.showAllOperatingModes = value; } bool showVehiclesFromOtherTrackTypes_get() { - return GetGameState().Cheats.ShowVehiclesFromOtherTrackTypes; + return GetGameState().Cheats.showVehiclesFromOtherTrackTypes; } void showVehiclesFromOtherTrackTypes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.ShowVehiclesFromOtherTrackTypes = value; + GetGameState().Cheats.showVehiclesFromOtherTrackTypes = value; } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 127ae7f172..256a9c66c3 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -125,7 +125,7 @@ void ClimateUpdate() if (gScreenFlags & (~SCREEN_FLAGS_PLAYING)) return; - if (!GetGameState().Cheats.FreezeWeather) + if (!GetGameState().Cheats.freezeWeather) { if (gameState.ClimateUpdateTimer) { diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index a3d65ad733..3d4e4e7585 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -146,7 +146,7 @@ GameActions::Result MapCanConstructWithClearAt( return res; } - if (GetGameState().Cheats.DisableClearanceChecks) + if (GetGameState().Cheats.disableClearanceChecks) { res.SetData(ConstructClearResult{ groundFlags }); return res; diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 347aa277ac..cd4c241316 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -561,7 +561,7 @@ static void Loc6A6D7E( FootpathNeighbourList* neighbourList) { auto targetPos = CoordsXY{ initialTileElementPos } + CoordsDirectionDelta[direction]; - if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode) && MapIsEdge(targetPos)) + if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && MapIsEdge(targetPos)) { if (query) { @@ -1808,7 +1808,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement static ObjectEntryIndex FootpathGetDefaultSurface(bool queue) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode); + bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); for (ObjectEntryIndex i = 0; i < kMaxFootpathSurfaceObjects; i++) { auto pathEntry = GetPathSurfaceEntry(i); @@ -1832,7 +1832,7 @@ static bool FootpathIsSurfaceEntryOkay(ObjectEntryIndex index, bool queue) auto pathEntry = GetPathSurfaceEntry(index); if (pathEntry != nullptr) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode); + bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); if (!showEditorPaths && (pathEntry->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)) { return false; @@ -1860,7 +1860,7 @@ static ObjectEntryIndex FootpathGetDefaultRailings() static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode); + bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); auto footpathObj = objManager.GetLoadedObject(index); if (footpathObj != nullptr) diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 3e69e19bdc..b79b1a5ad3 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -830,7 +830,7 @@ bool MapCanBuildAt(const CoordsXYZ& loc) { if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) return true; - if (GetGameState().Cheats.SandboxMode) + if (GetGameState().Cheats.sandboxMode) return true; if (MapIsLocationOwned(loc)) return true; @@ -966,7 +966,7 @@ uint8_t MapGetLowestLandHeight(const MapRange& range) if (surfaceElement != nullptr && min_height > surfaceElement->BaseHeight) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ xi, yi })) { @@ -995,7 +995,7 @@ uint8_t MapGetHighestLandHeight(const MapRange& range) auto* surfaceElement = MapGetSurfaceElementAt(CoordsXY{ xi, yi }); if (surfaceElement != nullptr) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.SandboxMode) + if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ xi, yi })) { @@ -1318,8 +1318,8 @@ void MapRemoveOutOfRangeElements() // Map resize has to become its own Game Action to properly solve this issue. // auto& gameState = GetGameState(); - bool buildState = gameState.Cheats.BuildInPauseMode; - gameState.Cheats.BuildInPauseMode = true; + bool buildState = gameState.Cheats.buildInPauseMode; + gameState.Cheats.buildInPauseMode = true; for (int32_t y = MAXIMUM_MAP_SIZE_BIG - kCoordsXYStep; y >= 0; y -= kCoordsXYStep) { @@ -1340,7 +1340,7 @@ void MapRemoveOutOfRangeElements() } // Reset cheat state - gameState.Cheats.BuildInPauseMode = buildState; + gameState.Cheats.buildInPauseMode = buildState; } static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, SurfaceElement& destTile) diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index e25c3ebf47..d5dc982134 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -179,7 +179,7 @@ void SmallSceneryElement::UpdateAge(const CoordsXY& sceneryPos) } auto& gameState = GetGameState(); - if (gameState.Cheats.DisablePlantAging && sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED)) + if (gameState.Cheats.disablePlantAging && sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED)) { return; } @@ -310,7 +310,7 @@ bool IsSceneryAvailableToBuild(const ScenerySelection& item) } auto& gameState = GetGameState(); - if (!gameState.Cheats.IgnoreResearchStatus) + if (!gameState.Cheats.ignoreResearchStatus) { if (!SceneryIsInvented(item)) { @@ -318,7 +318,7 @@ bool IsSceneryAvailableToBuild(const ScenerySelection& item) } } - if (!gameState.Cheats.SandboxMode && !(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!gameState.Cheats.sandboxMode && !(gScreenFlags & SCREEN_FLAGS_EDITOR)) { if (IsSceneryItemRestricted(item)) { diff --git a/src/openrct2/world/tile_element/TrackElement.cpp b/src/openrct2/world/tile_element/TrackElement.cpp index 0e96088da3..46dfb7880e 100644 --- a/src/openrct2/world/tile_element/TrackElement.cpp +++ b/src/openrct2/world/tile_element/TrackElement.cpp @@ -252,7 +252,7 @@ void TrackElement::SetBrakeClosed(bool isClosed) bool TrackElement::IsIndestructible() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !GetGameState().Cheats.MakeAllDestructible; + return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !GetGameState().Cheats.makeAllDestructible; } void TrackElement::SetIsIndestructible(bool isIndestructible) diff --git a/test/tests/PlayTests.cpp b/test/tests/PlayTests.cpp index 1cbeb80f2b..f5ff736982 100644 --- a/test/tests/PlayTests.cpp +++ b/test/tests/PlayTests.cpp @@ -116,7 +116,7 @@ TEST_F(PlayTests, SecondGuestInQueueShouldNotRideIfNoFunds) execute(ferrisWheel.id, 0, true); // Ignore intensity to stimulate peeps to queue into ferris wheel - gameState.Cheats.IgnoreRideIntensity = true; + gameState.Cheats.ignoreRideIntensity = true; // Insert a rich guest auto richGuest = Park::GenerateGuest(); @@ -175,7 +175,7 @@ TEST_F(PlayTests, CarRideWithOneCarOnlyAcceptsTwoGuests) execute(carRide.id, 0, true); // Ignore intensity to stimulate peeps to queue into the ride - gameState.Cheats.IgnoreRideIntensity = true; + gameState.Cheats.ignoreRideIntensity = true; // Create some guests std::vector guests;