From bd18bce3a712fd99cd2e8bc01c30ca1e2f6a343e Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Sat, 26 Jun 2021 15:00:05 +0200 Subject: [PATCH] Reflect actual string in string identifier (#14958) --- src/openrct2-ui/windows/TrackList.cpp | 2 +- src/openrct2/actions/PlaceParkEntranceAction.cpp | 14 ++++++-------- src/openrct2/actions/WallPlaceAction.cpp | 12 ++++++------ src/openrct2/localisation/StringIds.h | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index 440a8d494f..88ab3fd192 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -241,7 +241,7 @@ static void window_track_list_select(rct_window* w, int32_t listIndex) // Displays a message if the ride can't load, fix #4080 if (_loadedTrackDesign == nullptr) { - context_show_error(STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_TRACK_LOAD_FAILED_ERROR, {}); + context_show_error(STR_CANT_BUILD_THIS_HERE, STR_TRACK_LOAD_FAILED_ERROR, {}); return; } diff --git a/src/openrct2/actions/PlaceParkEntranceAction.cpp b/src/openrct2/actions/PlaceParkEntranceAction.cpp index cccd9e92f9..248353afee 100644 --- a/src/openrct2/actions/PlaceParkEntranceAction.cpp +++ b/src/openrct2/actions/PlaceParkEntranceAction.cpp @@ -43,8 +43,7 @@ GameActions::Result::Ptr PlaceParkEntranceAction::Query() const { if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) { - return std::make_unique( - GameActions::Status::NotInEditorMode, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_NONE); + return std::make_unique(GameActions::Status::NotInEditorMode, STR_CANT_BUILD_THIS_HERE, STR_NONE); } auto res = std::make_unique(); @@ -55,19 +54,18 @@ GameActions::Result::Ptr PlaceParkEntranceAction::Query() const || _loc.y >= (gMapSizeUnits - 32)) { return std::make_unique( - GameActions::Status::InvalidParameters, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_TOO_CLOSE_TO_EDGE_OF_MAP); + GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_TOO_CLOSE_TO_EDGE_OF_MAP); } if (!CheckMapCapacity(3)) { - return std::make_unique( - GameActions::Status::NoFreeElements, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_NONE); + return std::make_unique(GameActions::Status::NoFreeElements, STR_CANT_BUILD_THIS_HERE, STR_NONE); } if (gParkEntrances.size() >= MAX_PARK_ENTRANCES) { return std::make_unique( - GameActions::Status::InvalidParameters, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_ERR_TOO_MANY_PARK_ENTRANCES); + GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_ERR_TOO_MANY_PARK_ENTRANCES); } auto zLow = _loc.z; @@ -88,7 +86,7 @@ GameActions::Result::Ptr PlaceParkEntranceAction::Query() const if (auto res2 = MapCanConstructAt({ entranceLoc, zLow, zHigh }, { 0b1111, 0 }); res2->Error != GameActions::Status::Ok) { return std::make_unique( - GameActions::Status::NoClearance, STR_CANT_BUILD_PARK_ENTRANCE_HERE, res2->ErrorMessage.GetStringId(), + GameActions::Status::NoClearance, STR_CANT_BUILD_THIS_HERE, res2->ErrorMessage.GetStringId(), res2->ErrorMessageArgs.data()); } @@ -97,7 +95,7 @@ GameActions::Result::Ptr PlaceParkEntranceAction::Query() const if (entranceElement != nullptr) { return std::make_unique( - GameActions::Status::ItemAlreadyPlaced, STR_CANT_BUILD_PARK_ENTRANCE_HERE, STR_NONE); + GameActions::Status::ItemAlreadyPlaced, STR_CANT_BUILD_THIS_HERE, STR_NONE); } } diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 604c58f532..583db43616 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -21,22 +21,22 @@ #include "../world/Wall.h" WallPlaceActionResult::WallPlaceActionResult() - : GameActions::Result(GameActions::Status::Ok, STR_CANT_BUILD_PARK_ENTRANCE_HERE) + : GameActions::Result(GameActions::Status::Ok, STR_CANT_BUILD_THIS_HERE) { } WallPlaceActionResult::WallPlaceActionResult(GameActions::Status err) - : GameActions::Result(err, STR_CANT_BUILD_PARK_ENTRANCE_HERE) + : GameActions::Result(err, STR_CANT_BUILD_THIS_HERE) { } WallPlaceActionResult::WallPlaceActionResult(GameActions::Status err, rct_string_id msg) - : GameActions::Result(err, STR_CANT_BUILD_PARK_ENTRANCE_HERE, msg) + : GameActions::Result(err, STR_CANT_BUILD_THIS_HERE, msg) { } WallPlaceActionResult::WallPlaceActionResult(GameActions::Status error, rct_string_id msg, uint8_t* args) - : GameActions::Result(error, STR_CANT_BUILD_PARK_ENTRANCE_HERE, msg, args) + : GameActions::Result(error, STR_CANT_BUILD_THIS_HERE, msg, args) { } @@ -94,7 +94,7 @@ void WallPlaceAction::Serialise(DataSerialiser& stream) GameActions::Result::Ptr WallPlaceAction::Query() const { auto res = std::make_unique(); - res->ErrorTitle = STR_CANT_BUILD_PARK_ENTRANCE_HERE; + res->ErrorTitle = STR_CANT_BUILD_THIS_HERE; res->Position = _loc; res->Expenditure = ExpenditureType::Landscaping; @@ -302,7 +302,7 @@ GameActions::Result::Ptr WallPlaceAction::Query() const GameActions::Result::Ptr WallPlaceAction::Execute() const { auto res = std::make_unique(); - res->ErrorTitle = STR_CANT_BUILD_PARK_ENTRANCE_HERE; + res->ErrorTitle = STR_CANT_BUILD_THIS_HERE; res->Position = _loc; res->Expenditure = ExpenditureType::Landscaping; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 3ee0e0f04d..c3a474e0da 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -1228,7 +1228,7 @@ enum STR_LAST_BREAKDOWN = 1808, STR_CURRENT_BREAKDOWN = 1809, STR_CARRYING = 1810, - STR_CANT_BUILD_PARK_ENTRANCE_HERE = 1811, + STR_CANT_BUILD_THIS_HERE = 1811, STR_STRING_DEFINED_TOOLTIP = 1812, STR_MISCELLANEOUS = 1813, STR_ACTIONS = 1814,