Commit Graph
23325 Commits
Author SHA1 Message Date
mix 432baaaa61 Fix RootCommands _address type from char* to u8string 2026-05-02 15:21:21 +01:00
mix 8b90ce579d Fix CommandLine::Sprite::_mode type from char* to u8string 2026-05-02 15:18:51 +01:00
Michael Steenbeek 95fbd1f6c8 Add station style whitelist to prepare for split (#26476) 2026-05-01 11:42:00 +02:00
Aaron van Geffen 7990dbed7d Reduce nesting/indentation in ReadWriteTilesChunk (#26468)
* ParkFile: reduce nesting/indentation in ReadWriteTilesChunk

* Remove unnecessary include from ParkFile.h
2026-04-29 10:34:10 +02:00
mix 310286821f Split upright and inverted multi dimension track paint code (#26436) 2026-04-28 22:41:03 +02:00
Michał Janiszewski 75f36ca1fe Add more context to IStream exceptions (#26106)
This adds a bit more context to IStream exceptions. Some methods already supply that information, but most don't. This unifies approach we have.
2026-04-28 20:31:40 +00:00
rinode 8de672bc82 Fix #26462: Opening Tile Inspector crashes the game 2026-04-28 22:00:37 +02:00
rinode 72446f7b3a Fix #26460: Delete, build, forward and backward buttons in Ride Construction window are always held 2026-04-28 22:00:03 +02:00
Michael Steenbeek d3067f2790 Fix #26463: getWidgetByIndex() causes a crash if index is out-of-bounds (#26470) 2026-04-28 21:56:04 +02:00
Marino Rottier 6e45d802ec Automatically publish plugin types to NPM (#26283)
* add workflow and package.json for publishing plugin TypeScript types

* move scripting-related files to scripting folder

* add support for trusted publishers

* fix path to scripting readme

* rename scripting README.md back to scripting.md

* support tagged/dev releases

* add workflow for development versions

* Update package.json website

* change dependencies in publish-plugin-types

* add timestamp to dev plugin versions

* note ScriptEngine.h grep dependency from CI

* use gh-describe to track release version for dev plugin types
2026-04-28 21:25:57 +02:00
Marino Rottier 45ff80d890 Refactor widget state to single storage model (#26443)
* Allow flag/bitmask coexistence in readers

* Add factory helpers and bulk setters for per-widget flags

* Switch coexistence from OR-both to per-window opt-in

* Migrate seven small windows to per-widget flags

* Migrate seven more windows to per-widget flags

* Migrate Cheats, MapGen and Footpath to per-widget flags

* Fix #26421: scenery tab highlight wraps when there are 64+ groups

* Migrate Ride window to per-widget flags

* Migrate ride and maze construction windows to per-widget flags

* Migrate six more windows to per-widget flags

* Migrate Banner, EditorScenarioOptions and RideList to per-widget flags

* Migrate SceneryScatter and LoadSave to per-widget flags

* Migrate EditorObjectSelection, GameBottomToolbar, Guest, Map, NewRide and Park to per-widget flags

* Migrate TopToolbar, TrackList, Research, Player and Options to per-widget flags

* Opt in remaining windows to per-widget flags

* Narrow getters and setters to per-widget flags

* Remove bitmask fields and useWidgetFlags switch

* Restore switch statements for tab/density pressed state

* Add makeHoldableSpinnerWidgets to drop per-page loops

* Update tests for per-widget flag storage

* Add changelog entry for #26421

* Reword narrative-tense comments from the migration

* Fix clang-format violations

* Remove dead holdable-widget tables from Park and Finances
2026-04-28 09:26:02 +02:00
Basssiiie a939eccc14 Add higher resolution app icons for Android (#26374) 2026-04-27 14:43:03 +00:00
michboy fda8fe0f6c Fix #26287: Game crashes upon connect/disconnect of physical keyboard (#26394)
Prevent Android Activity from re-creating on configuration changes.

Ensures the NativeActivity handles keyboard plugging and orientation changes smoothly by declaring them in android:configChanges.
2026-04-22 11:01:24 +00:00
MarcelVos96 f415e465bf Fix #26419: Having an inversion on the Flying Coaster doesn't prevent stat penalty for drops or negative g's (#26420) 2026-04-22 12:39:43 +02:00
Basssiiie c083a838fd Improve default config.ini settings on new Android installs (#26386) 2026-04-22 10:10:45 +00:00
MarcelVos96 8323e0f306 Fix #26432: Guests choose to head for rides they have already ridden if they don't have a map 2026-04-22 12:03:40 +02:00
MarcelVos96 e49fcfd7d1 Fix inverted logic around peep watching spots (#26426) 2026-04-22 09:23:14 +02:00
mix e2b324cc0e Fix tiles mistakenly culled when elements below water and none above (#26410) 2026-04-22 09:03:47 +02:00
Aaron van Geffen 5e7888b672 Minor clean ups for macOS Platform and UiContext units (#26416) 2026-04-20 11:30:04 +02:00
mix e55eebe102 Fix invert flying large loop tunnel and train drawing glitches 2026-04-14 15:04:06 +01:00
mix fa5c0f0b9f Fix #26019: Invert large loop tunnel, support and train drawing glitches 2026-04-14 14:46:12 +01:00
Alex Harvey 8a98258b96 Fix #26183: Ride stat graphs tab text is partially off screen. (#26395) 2026-04-18 03:49:46 +00:00
Basssiiieandguysv ce9470971c Expose show/hideGridlines to scripting more safely (#24879)
Co-authored-by: guysv <sviryguy@gmail.com>
2026-04-18 03:37:11 +00:00
Max efb268af7d Add ride breakdown hook for scripting (#24243) 2026-04-18 03:25:23 +00:00
Aaron van Geffen 274759a9d2 Offset scenery collision checks slightly from quartile checks 2026-04-16 21:18:50 +09:00
Aaron van Geffen 3362e4b4cd Fix type for ParkEntranceGetIndex argument 2026-04-11 22:54:50 +09:00
Aaron van Geffen c0e7b6b41f Bugfix: fix groupbox title for large scenery items 2026-04-11 22:53:41 +09:00
Aaron van Geffen 124cf139df Add bottom padding to properties group 2026-04-10 08:36:20 +09:00
Aaron van Geffen a05015262e Align base height label with spinner caption 2026-04-10 08:35:45 +09:00
Aaron van Geffen f1b4c213bc Fix property index for various surface detail widgets (off-by-one) 2026-04-09 18:01:52 +02:00
Aaron van Geffen cdffbcb5b0 Tile inspector: offset spinner captions at text top 2026-04-09 17:53:29 +02:00
Aaron van Geffen dbd0e5e487 Tile inspector: give spinners their own size class 2026-04-09 17:47:01 +02:00
Aaron van Geffen 9e13c30815 Rework tile inspector onPrepareDraw to match widget definitions 2026-04-09 17:42:33 +02:00
Aaron van Geffen aee8d6b007 Tile Inspector: fix path additions label colour 2026-04-09 16:13:45 +02:00
Aaron van Geffen a09757261a Rename TileInspectorGroupboxSettings to GroupboxSettings 2026-04-09 15:16:29 +02:00
Aaron van Geffen b7e0b32569 Rename tile inspector constants to include k prefix 2026-04-09 15:09:57 +02:00
Aaron van Geffen 0530db25af Refactor tile inspector property drawing into functions by element type 2026-04-09 15:06:05 +02:00
mix a3fc66cb48 Fix inverted lay down helices being invisible when loading old saves (#26360) 2026-04-13 14:00:00 +02:00
mix cce3a72e40 Add tunnels to TED and use in trackPaintGeneric (#26286) 2026-04-13 11:53:25 +02:00
Gymnasiast 075993c2c6 Release v0.5.0
- Feature: [#23465] Change plugin JavaScript engine from Duktape to QuickJS-NG, allowing ES6+ features to be used in plugins.
- Feature: [#26178] Port of the Spinning Cars from RollerCoaster Tycoon 1.
- Improved: [#25314] Add unbanked and banked quarter helices to the Alpine, Corkscrew, Giga, Hybrid, Looping, Mine Ride, Mini, Multi-Dimension, Single Rail, Stand Up, Steeplechase and Twister tracks.
- Improved: [#26044] Simplify Android installation by bundling OpenRCT2 assets in APK.
- Improved: [#26293] Objects extracted from saves now have more information in their filenames.
- Improved: [objects#432] Allow saving scenery from RCT1 with track designs.
- Change: [#25962] The station style dropdown now shows entrance icons next to the labels for easier selection.
- Change: [#26175] The ride colour tab is made more compact by collapsing unavailable sections instead of only hiding them.
- Change: [#26178] Symmetric spinning trains and legacy ‘pre-reversed’ trains can no longer be reversed.
- Fix: [#10616] Quarter-tile trees cannot be placed on dry portions of half-water tiles.
- Fix: [#25128] Mute button displayed in wrong state after load.
- Fix: [#25460] Infinite loop when moving track design ghost queue over queue loop with zero clearances.
- Fix: [#25735] Ride synchronisation z-check works incorrectly.
- Fix: [#25919] Path drag tool error sound stacks when placement fails.
- Fix: [#25926] Path drag tool shows cost for single tile instead of total.
- Fix: [#25927] Wall drag tool error sound stacks and shows wrong cost.
- Fix: [#25962] Dropdown triangle glyphs are not optically centred.
- Fix: [#25993] Toggling “allow arbitrary ride type changes” does not resize open ride windows.
- Fix: [#26111] Vehicle colours tab can go out of bounds in certain edge cases.
- Fix: [#26118] Windows installers for releases are not signed properly.
- Fix: [#26128] The loan spinner widget does not appear on the same baseline as the text around it.
- Fix: [#26140] The time a guest has spent in a queue overflows back to 0 after it reaches 65535 (about a year).
- Fix: [#26159] The map generator window is not resized correctly in Enlarged UI mode.
- Fix: [#26196] The sprites of one angle of the Steeplechase left large turn are misaligned (original bug).
- Fix: [#26214] The wrong sprite is used for one angle of the gentle diagonal slope of Alpine, Hybrid and Single Rail tracks.
- Fix: [#26243] Increase max dropdown size from 512 to 1024 to accommodate parks with more than 512 rides.
- Fix: [#26306] Platform::FindApp fails to locate Homebrew-installed tools on macOS.
- Fix: [#26339] Crash when setting up a marketing campaign.
- Fix: [objects#430] The RCT1 Reverse Freefall car can be reversed and show broken sprites when doing so.
2026-04-12 11:03:20 +02:00
Gymnasiast f7e4eea86d Update Backtrace token for v0.5.0 2026-04-12 10:56:00 +02:00
Michał Janiszewski a89b1e40ca Fix unguarded access to shop items (#26339) 2026-04-07 21:48:30 +02:00
Michał Janiszewski 0da634d6e7 Fix #26310: crash when multiple subscribers register for the same event (#26315)
The scripting engine's `ExecutePluginCall` by default frees its `JSValue` arguments.
When `HookEngine::Call` iterates over multiple subscribers, the first call would free
the argument, leaving subsequent subscribers with an invalid pointer (use-after-free).

This commit fixes the issue by duplicating the `JSValue` for each subscriber and
ensuring the original value is correctly managed based on the `keepArgsAlive` flag.

A new C++ headless test `ScriptingTests.cpp` is added to verify the fix and prevent
future regressions.
2026-04-05 19:57:00 +02:00
Michał Janiszewski 8d9aec1090 Fix #26304: Use common prototypes for JS entities (#26321)
Previously JS entities would create prototypes on each allocation in
`Sc*::New`. This change creates a single global protype for each entity
class which then gets copied upon entity allocation in JS realm.

Running test with "Live Ride Measurements" plugin on a park shared for
performance testing I get following results:

|                 | OpenRCT2::Scripting::HookEngine::Call | OpenRCT2::Scripting::ScMap::getAllEntities |
|-----------------|---------------------------------------|--------------------------------------------|
| duktape         | 68ms                                  | 10ms                                       |
| quickjs current | 318ms                                 | 126ms                                      |
| quickjs + fix   | 22ms                                  | 942µs                                      |

Previously each call to `getAllEntities` would result in 1382 calls to
`JS_SetPropertyFunctionList`, each costing 90.5µs.

Park used: https://files.catbox.moe/z6j2g4.park
2026-04-05 09:22:47 +02:00
Kennedy McCarthy 357cadb12a Changed default FoothpathSlope (#26289)
Changed default FoothpathSlope in ScenarioPatcher so that builds work on Xcode 15
2026-04-03 23:59:50 +02:00
Aaron van Geffen 85b58ceca0 Pass ParkData ref to game actions (#26018)
* Pass ParkData ref to game actions

* Require ParkData& param for most Park functions

* Pass ParkData& param to Award check functions

* Replace a few more instances of indirect ParkData access
2026-04-03 23:36:12 +02:00
Sjoerd de Bruin 1653e167bb Fix #26306: Check Homebrew paths when FindApp fails on macOS (#26307)
Fixes #26306, this allowed the set-up process to continue on my system.
2026-04-03 23:22:36 +02:00
Michael Steenbeek 6f8533462a Merge pull request #26293 from Gymnasiast/feature/write-dat-header
Write DAT filenames with flags and checksum
2026-04-03 23:12:08 +02:00
Basssiiie cee8fcbee6 Remove some unused includes and simplify some others (#26317) 2026-04-03 23:04:34 +02:00
Gymnasiast bf4d42b9bd Write out flags and checksums when exporting DAT files 2026-04-03 23:03:39 +02:00