Only check if ride mode exists when placing new track design, fixes #2445

This commit is contained in:
Gymnasiast 2015-12-15 15:09:39 +01:00
parent 0075410668
commit e2ccfc1cb8
4 changed files with 9 additions and 7 deletions

View File

@ -228,6 +228,7 @@ enum {
STR_COST_AMOUNT = 986,
STR_TOO_MANY_RIDES = 987,
STR_CANT_CREATE_NEW_RIDE_ATTRACTION = 988,
STR_CONSTRUCTION = 990,

View File

@ -3629,6 +3629,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
switch (setting){
case 0:
// Alteration: only check if the ride mode exists, and fall back to the default if it doesn't.
invalidate_test_results(ride_id);
ride_clear_for_construction(ride_id);
ride_remove_peeps(ride_id);
@ -3641,16 +3642,16 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
}
uint8 default_mode = available_modes[0];
available_modes = AllRideModesAvailable;
for (; *available_modes != 0xFF; available_modes++){
if (*available_modes == new_value)
break;
}
if (*available_modes == 0xFF) new_value = default_mode;
if (available_modes[1] == 0xFF){
if ((ride_entry->flags & RIDE_ENTRY_DISABLE_LAST_OPERATING_MODE) && !gCheatsShowAllOperatingModes)
new_value = default_mode;
if (*available_modes == 0xFF) {
log_warning("Tried to use incorrect ride mode, using default for this ride type.");
new_value = default_mode;
}
ride->mode = new_value;

View File

@ -736,7 +736,7 @@ const uint8 RideAvailableModes[] = {
RIDE_MODE_CIRCUS_SHOW, 0xFF, // 31 Circus Show
RIDE_MODE_CONTINUOUS_CIRCUIT, 0xFF, // 32 Ghost Train
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 33 Twister Roller Coaster
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 34 Wooden Roller Coaster
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, RIDE_MODE_REVERSE_INCLINE_LAUNCHED_SHUTTLE, 0xFF, // 34 Wooden Roller Coaster
RIDE_MODE_CONTINUOUS_CIRCUIT, 0xFF, // 35 Side-Friction Roller Coaster
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 36 Wild Mouse
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 37 Multi Dimension Coaster

View File

@ -3290,7 +3290,7 @@ void game_command_place_track_design(int* eax, int* ebx, int* ecx, int* edx, int
entry_index = 0xFF;
}
RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 988;
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_CREATE_NEW_RIDE_ATTRACTION;
int rideIndex = 0;
{
int _eax = 0,