mirror of https://github.com/OpenRCT2/OpenRCT2.git
Only check if ride mode exists when placing new track design, fixes #2445
This commit is contained in:
parent
0075410668
commit
e2ccfc1cb8
|
@ -228,6 +228,7 @@ enum {
|
||||||
STR_COST_AMOUNT = 986,
|
STR_COST_AMOUNT = 986,
|
||||||
|
|
||||||
STR_TOO_MANY_RIDES = 987,
|
STR_TOO_MANY_RIDES = 987,
|
||||||
|
STR_CANT_CREATE_NEW_RIDE_ATTRACTION = 988,
|
||||||
|
|
||||||
STR_CONSTRUCTION = 990,
|
STR_CONSTRUCTION = 990,
|
||||||
|
|
||||||
|
|
|
@ -3629,6 +3629,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
|
||||||
|
|
||||||
switch (setting){
|
switch (setting){
|
||||||
case 0:
|
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);
|
invalidate_test_results(ride_id);
|
||||||
ride_clear_for_construction(ride_id);
|
ride_clear_for_construction(ride_id);
|
||||||
ride_remove_peeps(ride_id);
|
ride_remove_peeps(ride_id);
|
||||||
|
@ -3641,15 +3642,15 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 default_mode = available_modes[0];
|
uint8 default_mode = available_modes[0];
|
||||||
|
|
||||||
|
available_modes = AllRideModesAvailable;
|
||||||
for (; *available_modes != 0xFF; available_modes++){
|
for (; *available_modes != 0xFF; available_modes++){
|
||||||
if (*available_modes == new_value)
|
if (*available_modes == new_value)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*available_modes == 0xFF) new_value = default_mode;
|
if (*available_modes == 0xFF) {
|
||||||
|
log_warning("Tried to use incorrect ride mode, using default for this ride type.");
|
||||||
if (available_modes[1] == 0xFF){
|
|
||||||
if ((ride_entry->flags & RIDE_ENTRY_DISABLE_LAST_OPERATING_MODE) && !gCheatsShowAllOperatingModes)
|
|
||||||
new_value = default_mode;
|
new_value = default_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -736,7 +736,7 @@ const uint8 RideAvailableModes[] = {
|
||||||
RIDE_MODE_CIRCUS_SHOW, 0xFF, // 31 Circus Show
|
RIDE_MODE_CIRCUS_SHOW, 0xFF, // 31 Circus Show
|
||||||
RIDE_MODE_CONTINUOUS_CIRCUIT, 0xFF, // 32 Ghost Train
|
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, // 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, 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, // 36 Wild Mouse
|
||||||
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 37 Multi Dimension Coaster
|
RIDE_MODE_CONTINUOUS_CIRCUIT, RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED, 0xFF, // 37 Multi Dimension Coaster
|
||||||
|
|
|
@ -3290,7 +3290,7 @@ void game_command_place_track_design(int* eax, int* ebx, int* ecx, int* edx, int
|
||||||
entry_index = 0xFF;
|
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 rideIndex = 0;
|
||||||
{
|
{
|
||||||
int _eax = 0,
|
int _eax = 0,
|
||||||
|
|
Loading…
Reference in New Issue