mirror of https://github.com/OpenRCT2/OpenRCT2.git
Close #21728: Apply "Fix all rides" even if mechanic is already working
Added checks for mechanic fixing plus handles inspecting and calling.
This commit is contained in:
parent
21001be23d
commit
fe6da02718
|
@ -2,6 +2,7 @@
|
|||
------------------------------------------------------------------------
|
||||
- Feature: [#11512] Coloured usernames by group on multiplayer servers.
|
||||
- Feature: [#21734] Park admittance price can now be set via text input.
|
||||
- Improved: [#21728] “Fix all rides” cheat now also works if a mechanic is already fixing the ride.
|
||||
- Improved: [#21769] Expose “animation is backwards” wall property in Tile Inspector.
|
||||
- Improved: [#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting.
|
||||
- Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible.
|
||||
|
|
|
@ -512,13 +512,22 @@ void CheatSetAction::FixBrokenRides() const
|
|||
{
|
||||
for (auto& ride : GetRideManager())
|
||||
{
|
||||
if ((ride.mechanic_status != RIDE_MECHANIC_STATUS_FIXING)
|
||||
&& (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)))
|
||||
if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN))
|
||||
{
|
||||
auto mechanic = RideGetAssignedMechanic(ride);
|
||||
|
||||
if (mechanic != nullptr)
|
||||
{
|
||||
mechanic->RemoveFromRide();
|
||||
if (ride.mechanic_status == RIDE_MECHANIC_STATUS_FIXING)
|
||||
{
|
||||
mechanic->RideSubState = PeepRideSubState::ApproachExit;
|
||||
}
|
||||
else if (
|
||||
ride.mechanic_status == RIDE_MECHANIC_STATUS_CALLING
|
||||
|| ride.mechanic_status == RIDE_MECHANIC_STATUS_HEADING)
|
||||
{
|
||||
mechanic->RemoveFromRide();
|
||||
}
|
||||
}
|
||||
|
||||
RideFixBreakdown(ride, 0);
|
||||
|
|
Loading…
Reference in New Issue