diff --git a/src/windows/cheats.c b/src/windows/cheats.c index ac7261a438..fcac4fca52 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -66,7 +66,8 @@ enum WINDOW_CHEATS_WIDGET_IDX { WIDX_WATER_PLANTS, WIDX_FIX_VANDALISM, WIDX_REMOVE_LITTER, - WIDX_WIN_SCENARIO + WIDX_WIN_SCENARIO, + WIDX_RENEW_RIDES }; #pragma region MEASUREMENTS @@ -137,6 +138,7 @@ static rct_widget window_cheats_misc_widgets[] = { { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(7), HPL(7), 2756, STR_NONE}, // Remove litter { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(0), HPL(0), 2766, STR_NONE}, // Win scenario + { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(7), HPL(7), 5123, STR_NONE}, // Renew rides { WIDGETS_END }, }; @@ -259,7 +261,7 @@ static void* window_cheats_page_events[] = { static uint32 window_cheats_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_HIGH_MONEY) | (1 << WIDX_PARK_ENTRANCE_FEE), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_HAPPY_GUESTS) | (1 << WIDX_TRAM_GUESTS), - (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_DECREASE_GAME_SPEED) | (1 << WIDX_INCREASE_GAME_SPEED) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) + (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_DECREASE_GAME_SPEED) | (1 << WIDX_INCREASE_GAME_SPEED) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_RENEW_RIDES) }; static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); @@ -347,6 +349,16 @@ static void cheat_fix_rides() } } +static void cheat_renew_rides() +{ + int i; + rct_ride *ride; + + FOR_ALL_RIDES(i, ride) + ride->build_date = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16); + window_invalidate_by_class(WC_RIDE); +} + static void cheat_clear_loan() { // TODO, this sets the loan but stops loan borrowing from working, possible due to cheat detection stuff @@ -519,6 +531,9 @@ static void window_cheats_misc_mouseup() case WIDX_WIN_SCENARIO: scenario_success(); break; + case WIDX_RENEW_RIDES: + cheat_renew_rides(); + break; } } @@ -681,4 +696,4 @@ static void window_cheats_misc_tool_down() mapElement->clearance_height = 0; } } while (!map_element_is_last_for_tile(mapElement++)); -} \ No newline at end of file +}