From d58673105d14a677ff1a4acd77835d89610f8ee6 Mon Sep 17 00:00:00 2001 From: Mike <14914822+harvito@users.noreply.github.com> Date: Thu, 9 May 2024 08:45:33 -0400 Subject: [PATCH] Close #21974: No reason specified when attempting to place path additions on junctions --- contributors.md | 1 + data/language/en-GB.txt | 1 + distribution/changelog.txt | 1 + src/openrct2/actions/FootpathAdditionPlaceAction.cpp | 3 ++- src/openrct2/localisation/StringIds.h | 2 ++ 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contributors.md b/contributors.md index d540ac0c27..e6d2a586b0 100644 --- a/contributors.md +++ b/contributors.md @@ -239,6 +239,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * Cory Ye (CoryfY) * Karsten Van Fossan (karstenvanf) * Kaavya Ramachandhran (ayvaak) +* Mike Harvey (harvito) ## Toolchain * (Balletie) - macOS diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 5efb4deb23..a4d760c681 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3699,6 +3699,7 @@ STR_6624 :Tile Inspector: Sort elements STR_6625 :Invalid colour STR_6626 :Animation is backwards STR_6627 :Track speed too high! +STR_6628 :Can only be placed on path edges! ############# # Scenarios # diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 9a1deaed77..3beb68e455 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -6,6 +6,7 @@ - Improved: [#21981] The map window now defaults to showing as much of the map as fits the screen. - Change: [#7248] Small mini-maps are now centred in the map window. - Fix: [#13294] Map corners are cut off in some directions (original bug). +- Fix: [#21974] No reason specified when attempting to place benches, lamps, or bins on path with no unconnected edges (original bug). 0.4.11 (2024-05-05) ------------------------------------------------------------------------ diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index e49cdd8849..0b602f9fd0 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -121,7 +121,8 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const if (!(sceneryFlags & (PATH_ADDITION_FLAG_JUMPING_FOUNTAIN_WATER | PATH_ADDITION_FLAG_JUMPING_FOUNTAIN_SNOW)) && (pathElement->GetEdges()) == 0x0F) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_CAN_ONLY_BE_PLACED_ON_PATH_EDGES); } if ((sceneryFlags & PATH_ADDITION_FLAG_IS_QUEUE_SCREEN) && !pathElement->IsQueue()) diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 9cb6ed8e8a..bbcf2c79e3 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -4047,6 +4047,8 @@ enum : uint16_t STR_SPEED_TOO_HIGH = 6627, + STR_CAN_ONLY_BE_PLACED_ON_PATH_EDGES = 6628, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings };