From 1eacb1eec8a512885e4e84d546fe2980fd6b5b58 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 12 Aug 2026 16:15:42 +0200 Subject: [PATCH] Fix formatting for MazeConstruction.cpp --- src/openrct2-ui/windows/MazeConstruction.cpp | 62 ++++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index e39559e8e0..5186540908 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -362,45 +362,45 @@ namespace OpenRCT2::Ui::Windows entranceOrExitCoords, DirectionReverse(entranceOrExitCoords.direction), rideIndex, gRideEntranceExitPlaceStationIndex, gRideEntranceExitPlaceType == EntranceType::rideExit); - rideEntranceExitPlaceAction.SetCallback([=, this]( - const GameActions::GameAction* ga, const GameActions::Result* result) { - if (result->error != GameActions::Status::ok) - return; + rideEntranceExitPlaceAction.SetCallback( + [=, this](const GameActions::GameAction* ga, const GameActions::Result* result) { + if (result->error != GameActions::Status::ok) + return; - Audio::Play3D(Audio::SoundId::placeItem, result->position); + Audio::Play3D(Audio::SoundId::placeItem, result->position); - auto* windowMgr = GetWindowManager(); + auto* windowMgr = GetWindowManager(); - auto currentRide = GetRide(rideIndex); - if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) - { - ToolCancel(); - if (!currentRide->getRideTypeDescriptor().flags.has(RtdFlag::hasTrack)) + auto currentRide = GetRide(rideIndex); + if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) { - windowMgr->CloseByClass(WindowClass::rideConstruction); - } - } - else - { - WidgetIndex newToolWidgetIndex; - if (gRideEntranceExitPlaceType == EntranceType::rideEntrance) - { - gRideEntranceExitPlaceType = EntranceType::rideExit; - newToolWidgetIndex = WIDX_MAZE_EXIT; + ToolCancel(); + if (!currentRide->getRideTypeDescriptor().flags.has(RtdFlag::hasTrack)) + { + windowMgr->CloseByClass(WindowClass::rideConstruction); + } } else { - gRideEntranceExitPlaceType = EntranceType::rideEntrance; - newToolWidgetIndex = WIDX_MAZE_ENTRANCE; + WidgetIndex newToolWidgetIndex; + if (gRideEntranceExitPlaceType == EntranceType::rideEntrance) + { + gRideEntranceExitPlaceType = EntranceType::rideExit; + newToolWidgetIndex = WIDX_MAZE_EXIT; + } + else + { + gRideEntranceExitPlaceType = EntranceType::rideEntrance; + newToolWidgetIndex = WIDX_MAZE_ENTRANCE; + } + + windowMgr->InvalidateByClass(WindowClass::rideConstruction); + ToolCancel(); + ToolSet(*this, newToolWidgetIndex, Tool::crosshair); + + WindowMazeConstructionUpdatePressedWidgets(); } - - windowMgr->InvalidateByClass(WindowClass::rideConstruction); - ToolCancel(); - ToolSet(*this, newToolWidgetIndex, Tool::crosshair); - - WindowMazeConstructionUpdatePressedWidgets(); - } - }); + }); auto res = GameActions::Execute(&rideEntranceExitPlaceAction, getGameState()); }