Fix formatting for MazeConstruction.cpp

This commit is contained in:
Gymnasiast committed 2026-08-12 18:42:23 +02:00
1 parent 5af73fa31b
commit 1eacb1eec8
1 file changed
+31 -31
+31 -31
View File
@@ -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());
}