mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
Disallow firing staff who are currently fixing or inspecting rides (#20260)
* Disallow firing staff who are currently fixing or inspecting rides * Disable fire button when staff member is inspecting/fixing a ride * Add changelog entry * Up network version * Improve error message --------- Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
870c78001e
commit
b9382ae9fc
@@ -3693,6 +3693,8 @@ STR_6587 :The OpenRCT2 Title Theme is a work of Allister Brimble,{NEWLINE}lic
|
||||
STR_6588 :Thanks to Herman Riddering for allowing us to record the 35er Voigt.
|
||||
STR_6589 :Show window buttons on the left
|
||||
STR_6590 :Show the window buttons (e.g. to close the window) on the left of the title bar instead of on the right.
|
||||
STR_6591 :Staff member is currently fixing a ride and can’t be fired.
|
||||
STR_6592 :Staff member is currently inspecting a ride and can’t be fired.
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- Fix: [#19823] Parkobj: disallow overriding objects of different object types.
|
||||
- Fix: [#20111] All coaster types can access the new diagonal slope pieces.
|
||||
- Fix: [#20155] Fairground organ style 2 shows up as regular music, rather than for the merry-go-round.
|
||||
- Fix: [#20260] Ride locks up when inspecting/fixing staff member is fired.
|
||||
|
||||
0.4.5 (2023-05-08)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -1055,6 +1055,8 @@ private:
|
||||
{
|
||||
SetWidgetDisabled(WIDX_PICKUP, true);
|
||||
}
|
||||
|
||||
SetWidgetDisabled(WIDX_FIRE, staff->State == PeepState::Fixing || staff->State == PeepState::Inspecting);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,15 @@ GameActions::Result StaffFireAction::Query() const
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
|
||||
if (staff->State == PeepState::Fixing)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_FIRE_STAFF_FIXING, STR_NONE);
|
||||
}
|
||||
else if (staff->State == PeepState::Inspecting)
|
||||
{
|
||||
return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_FIRE_STAFF_INSPECTING, STR_NONE);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
}
|
||||
|
||||
|
||||
@@ -3997,6 +3997,9 @@ enum : uint16_t
|
||||
STR_WINDOW_BUTTONS_ON_THE_LEFT = 6589,
|
||||
STR_WINDOW_BUTTONS_ON_THE_LEFT_TIP = 6590,
|
||||
|
||||
STR_CANT_FIRE_STAFF_FIXING = 6591,
|
||||
STR_CANT_FIRE_STAFF_INSPECTING = 6592,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
|
||||
#define NETWORK_STREAM_VERSION "3"
|
||||
#define NETWORK_STREAM_VERSION "4"
|
||||
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user