diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index ebd2c98aad..2afccea9a9 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3773,6 +3773,7 @@ STR_6322 :{WINDOW_COLOUR_2}Sprite Id: {BLACK}{INT32} STR_6323 :Simulating STR_6324 :Simulate STR_6325 :{SMALLFONT}{BLACK}Simulate ride/attraction +STR_6326 :Can't simulate {POP16}{POP16}{POP16}{STRINGID}... ############# # Scenarios # diff --git a/src/openrct2/actions/RideSetStatus.hpp b/src/openrct2/actions/RideSetStatus.hpp index 3e5adc6eb8..b3a94a36c3 100644 --- a/src/openrct2/actions/RideSetStatus.hpp +++ b/src/openrct2/actions/RideSetStatus.hpp @@ -25,6 +25,7 @@ static rct_string_id _StatusErrorTitles[] = { STR_CANT_CLOSE, STR_CANT_OPEN, STR_CANT_TEST, + STR_CANT_SIMULATE, }; DEFINE_GAME_ACTION(RideSetStatusAction, GAME_COMMAND_SET_RIDE_STATUS, GameActionResult) @@ -73,7 +74,14 @@ public: if (_status != ride->status) { - if (_status == RIDE_STATUS_TESTING || _status == RIDE_STATUS_SIMULATING) + if (_status == RIDE_STATUS_SIMULATING && (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + { + // Simulating will force clear the track, so make sure player can't cheat around a break down + res->Error = GA_ERROR::DISALLOWED; + res->ErrorMessage = STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING; + return res; + } + else if (_status == RIDE_STATUS_TESTING || _status == RIDE_STATUS_SIMULATING) { if (!ride_is_valid_for_test(ride, _status, 0)) { diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index f139ce0d4c..d6e2388c42 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3960,6 +3960,7 @@ enum STR_SIMULATING = 6323, STR_SIMULATE_RIDE = 6324, STR_SIMULATE_RIDE_TIP = 6325, + STR_CANT_SIMULATE = 6326, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index a4009bb45a..140cb4dfe4 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -2483,7 +2483,7 @@ static void ride_breakdown_update(Ride* ride) if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - if (ride->status == RIDE_STATUS_CLOSED) + if (ride->status == RIDE_STATUS_CLOSED || ride->status == RIDE_STATUS_SIMULATING) return; if (!ride->CanBreakDown())