From 9507bf486a0e99edf915cbdf286cff7b29fc97ca Mon Sep 17 00:00:00 2001 From: Guy Sviry <32539816+guysv@users.noreply.github.com> Date: Sun, 4 Oct 2026 01:13:00 +0300 Subject: [PATCH] Fix TrackElement.seatRotation setter rejecting every ride except mazes (#27234) The maze check in ScTileElement::seatRotation_set was inverted, so the setter refused every track element except maze ones, the only ride type seat rotation does not apply to. Use the same check as the getter. --- distribution/changelog.txt | 1 + src/openrct2/scripting/ScriptEngine.h | 2 +- src/openrct2/scripting/bindings/world/ScTileElement.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index deb3a4ca69..4cd85ab7ab 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -39,6 +39,7 @@ - Fix: [#27136] Guests keep waiting at a level crossing after the train has passed, due to faulty iteration over the track the train has vacated. - Fix: [#27212] Chain lifts are blue in screenshots taken from the command line. - Fix: [#27218] Tile inspector coordinate spinners are too short for coordinate 1000. +- Fix: [#27234] [Plugin] Setting `TrackElement.seatRotation` fails on every ride except mazes, where it does not apply. 0.5.5 (2026-09-06) ------------------------------------------------------------------------ diff --git a/src/openrct2/scripting/ScriptEngine.h b/src/openrct2/scripting/ScriptEngine.h index 9942168c20..8f1c2b6818 100644 --- a/src/openrct2/scripting/ScriptEngine.h +++ b/src/openrct2/scripting/ScriptEngine.h @@ -43,7 +43,7 @@ namespace OpenRCT2 namespace OpenRCT2::Scripting { // Grepped from CI (.github/workflows/publish-plugin-types.yml); keep the format `kPluginApiVersion = N`. - static constexpr int32_t kPluginApiVersion = 123; + static constexpr int32_t kPluginApiVersion = 124; // Versions marking breaking changes. static constexpr int32_t kApiVersionPeepDeprecation = 33; diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index ce1b29b8c7..f78413d37d 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -1100,7 +1100,7 @@ namespace OpenRCT2::Scripting } const auto& rtd = ride->getRideTypeDescriptor(); - if (rtd.specialType != RtdSpecialType::maze) + if (rtd.specialType == RtdSpecialType::maze) { auto& scriptEngine = GetContext()->GetScriptEngine(); scriptEngine.LogPluginInfo("Cannot set 'seatRotation' property, TrackElement belongs to a maze.");