mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Fix Ride is greyed out when it doesn't work
This commit is contained in:
@@ -54,6 +54,7 @@ uint16 gDropdownItemsFormat[64];
|
||||
sint64 gDropdownItemsArgs[64];
|
||||
// Replaces 0x009DED38
|
||||
uint32 gDropdownItemsChecked;
|
||||
uint32 *gDropdownItemsDisabled = RCT2_ADDRESS(0x009DED34, uint32);
|
||||
|
||||
static void window_dropdown_emptysub() { }
|
||||
static void window_dropdown_paint();
|
||||
|
||||
@@ -36,6 +36,7 @@ extern int gDropdownNumItems;
|
||||
extern uint16 gDropdownItemsFormat[64];
|
||||
extern sint64 gDropdownItemsArgs[64];
|
||||
extern uint32 gDropdownItemsChecked;
|
||||
extern uint32 *gDropdownItemsDisabled;
|
||||
|
||||
void window_dropdown_show_text(int x, int y, int extray, uint8 colour, uint8 flags, int num_items);
|
||||
void window_dropdown_show_text_custom_width(int x, int y, int extray, uint8 colour, uint8 flags, int num_items, int width);
|
||||
|
||||
@@ -3463,7 +3463,7 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc
|
||||
|
||||
num_items = 1;
|
||||
breakdownReason = ride->breakdown_reason_pending;
|
||||
if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING))) {
|
||||
if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING)) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (RideAvailableBreakdowns[ride_type->ride_type[j]] & (uint8)(1 << i)) {
|
||||
if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) {
|
||||
@@ -3480,6 +3480,15 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) == 0 ||
|
||||
breakdownReason == BREAKDOWN_VEHICLE_MALFUNCTION ||
|
||||
breakdownReason == BREAKDOWN_RESTRAINTS_STUCK_CLOSED ||
|
||||
breakdownReason == BREAKDOWN_RESTRAINTS_STUCK_OPEN ||
|
||||
breakdownReason == BREAKDOWN_DOORS_STUCK_CLOSED ||
|
||||
breakdownReason == BREAKDOWN_DOORS_STUCK_OPEN) {
|
||||
*gDropdownItemsDisabled = (1 << 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user