Commit Graph
3127 Commits
Author SHA1 Message Date
frozensnowy 7cc48f5c14 Close #25362: Dragged footpaths over hills are disconnected (#25913)
When using the "drag to place" footpath tool over uneven terrain, paths are now automatically connected with appropriate slopes instead of being placed as disconnected flat tiles.  The algorithm works in three phases, first it gathers terrain height along the drag axis, then it filters out obstacles like spiked terrain (isolated height jumps), lastly it builds the path tiles with slopes to bridge height differences

Only applies when neither Shift nor Ctrl is pressed.
2026-08-21 22:07:27 +02:00
Gymnasiast 4fdcae5092 Fix: The window with missing objects is displayed under the ‘Load game’ window 2026-08-21 20:46:16 +02:00
Gymnasiast 54b7abd25a Fix: When showing missing objects, some types show up as ‘Unknown type’ 2026-08-21 20:37:57 +02:00
Stephan Spengler 7bf6a4b4fb Fix result.position.z of SmallSceneryPlaceAction (#26958)
Adds a changelog that also references #26441
2026-08-21 08:30:23 +02:00
Tulio Leao 4cce29b5a9 Fix #26056: Freeze when trying to download all objects on save where they are missing 2026-08-20 20:35:45 +02:00
Sjoerd de Bruin 34762ceb81 Fix #25558: plugin buttons ignore an explicitly set border (#26925)
Themes that draw borders around image buttons also added one to buttons created by plugins, even when the script had explicitly asked for no border.
2026-08-20 19:11:30 +02:00
Tulio Leao 911afdbd6e Fix changelog broken by #26954 (#26956) 2026-08-19 22:03:57 -03:00
RayKoopa d1ea87512f Fix land paint price not updating when holding Ctrl (#26954) 2026-08-20 00:06:17 +02:00
Sjoerd de Bruin 3768b08999 Request user attention when the save prompt blocks quitting (#26933)
Quitting OpenRCT2 from outside the game, e.g. from the dock or the taskbar, from another application, or on session logout, leaves the window in the background, so the save prompt opens behind whatever the user is actually looking at with nothing to indicate that the game is waiting on an answer.

SavePromptOpen() now asks the UI context for attention when an OS quit request opens the prompt while the window is unfocused. The other prompt modes follow a click in the game, so they cannot arrive unfocused. SDL maps this to a bouncing dock icon on macOS, a highlighted taskbar button on Windows, the urgency hint on X11 and a serial-less xdg-activation request on Wayland.
2026-08-19 17:42:09 +00:00
Sjoerd de Bruin ac926d5550 Fix #23872: Set load/save folder for parks loaded outside the game (#26927)
A park loaded through a file association or the command line never passes the load/save window, so that window kept opening in the folder from a previous session.
2026-08-19 17:39:46 +02:00
Marino Rottier e25c301668 feat: add PathNavigator (#26412)
* feat: add PathNavigator

* separate PathConnection from PathNavigator

* add PathNavigationOptions for PathNavigator

* make PathNavigationOptions positive instead of double-negative

* [skip ci] fix typo

* [skip ci] revert formatting

* align branch with develop after merge

* Address PR feedback

* Adapt PathNavigator to lowerCamelCase renames in develop

Upstream renamed TileElementType members and PathElement/BannerElement
accessors to lowerCamelCase (#26608, #26626 and follow-ups).

* Name PathNavigator/PathConnection Register and New

Use the same names as every other scripting engine class for these two
functions, so they don't read as doing something different.
2026-08-19 23:49:45 +10:00
Sjoerd de Bruin 8de0f10777 Fix #25496: guest pickup button does not grey out when guest state changes (#26926)
The button's state was only checked when the window was opened, a tab was switched or the window was resized, so it kept its old appearance while the window sat open. It is now checked on redraw, like the staff window does.
2026-08-18 17:35:22 +02:00
Basssiiie 8ebb607fc4 Fix #21632: Crash when loading custom image larger than 300 by 300 pixels (#26934)
Fixes #21632: a few crashes that can occur when loading a custom image via plugins.

- Catch `std::exception` instead of `std::runtime_error` because the 300x300 check throws a [`std::invalid_argument`](https://github.com/OpenRCT2/OpenRCT2/blob/11da390704950cd30f1275c392140480908183a0/src/openrct2/drawing/ImageImporter.cpp#L34) exception and `std::exception` is the base class of both (`std::runtime_error` is not).
- Replaced a few asserts with `std::runtime_error`s as well, because the test script supplied in the issue was tripping over those as well.

Now instead of crashing the game or throwing an assert, they log nice readable errors to the console for plugin developers.
2026-08-16 10:58:51 +00:00
Aaron van Geffen 182efeea9a Fix title windows not flashing when already open (#26935) 2026-08-16 10:01:40 +00:00
Aaron van Geffen 3d90510a63 Shrink and reposition top toolbar, allowing rain to be drawn (#26936) 2026-08-16 09:25:32 +00:00
Sjoerd de Bruin 27a9d4b3d5 Fix #26903: no permission for making a ride visible or invisible (#26911)
The setRideVisibility command was missing from the permission table, so canPerformCommand() could not map it and denied it for every client.
Filed under the cheat permission, as the button is only shown when the arbitrary ride type changes cheat is enabled.
2026-08-14 06:23:07 +00:00
Aaron van Geffen 95b54aa4f3 Fix bottom toolbar button invalidation (#26921) 2026-08-13 19:24:24 +00:00
Gymnasiast df06376780 Move indestructible cheat check to caller 2026-08-12 23:03:26 +02:00
Max a187bc9550 Close #26827: Add map resize hook to scripting API (#26828) 2026-08-09 20:55:24 +02:00
RayKoopa 2e43967fe5 Fix: water rides ignore zero clearances, preventing adjacent terrain modifications and building them anywhere (#26816)
Even with clearance checks disabled, it was not yet possible to build water elements (like Boat Hire track elements) on land or mid-air. This PR skips those validations if clearance checks are disabled.
2026-08-08 23:50:36 +02:00
Darkroman d7d8915065 Fixed bug where ride.previousVerticalG was reset to 0 instead of 100 (#26879)
Fixed a bug where ride.previousVerticalG was erroneously reset to 0 in test_reset function in Vehicle.cpp instead of 100. I verified by finding the variable which would be ride.previousVerticalG in the original RCT2 assembly as the offset [edi+13629FA]. It is reset to the value 0x64 at address 0x006D6C9B within what would be the test_reset function first located at 0x006D6BE7. To verify it was previousVerticalG I made a test coaster that had a max negative G readout of 0.57g. I put a conditional breakpoint on it first as less than 0x39 (< 57) as a boundary test. When running my test coaster the breakpoint didn't hit. I deleted a turn track and rebuilt it, and then I changed the breakpoint condition to < 0x3A (< 58). I ran another test on the coaster, and sure enough the breakpoint was hit when the coaster went down the 2nd hill.
2026-08-08 10:58:58 +02:00
RayKoopa 5a814722e1 Add Walls-only and Footpath Addition modes to Clear Scenery (#26877)
* Add two new modes for Clear Scenery.
- Split "Walls" from "Small Scenery" into own mode
- Add "Footpath Additions" mode
2026-08-07 20:49:40 +00:00
quarrel07 8bfe55af63 Add Liquid Glass app icon for macOS 26+ (#26862) 2026-08-06 19:56:33 +02:00
jcranston 1423ab779a Fix #26811: Crash when a ride points to a non-existing station object 2026-08-05 19:19:02 +02:00
ByteRaid b8cf2f8c35 Fix #25169: convert command strips packed objects (#26808) 2026-08-02 13:27:18 +00:00
Aaron van Geffen 89b9f7d64c Add changelog entries 2026-08-02 13:21:52 +02:00
Tulio Leao f475c5b949 Start v0.5.5 2026-08-02 08:17:56 -03:00
Tulio Leao 4a7ee146ca Release v0.5.4
- Improved: [#26560] [Plugin] Scripts can now be used to trigger saving a game (limited to the user save folder).
- Improved: [#26638] Guests will no longer watch rides while they’re underground.
- Improved: [#26747] Exporting a sprite file now also outputs a JSON file, allowing for round-trip conversions.
- Improved: [#26763] The ride colour/appearance tab now visually separates fields using group boxes.
- Improved: [#26765] The ride operations tab now visually separates fields using group boxes.
- Improved: [#26839] Magnify picked-up peeps when viewport is in double or quadruple zoom.
- Fix: [#26288] Land bordering map edges does not blend at certain angles.
- Fix: [#26610] Player list is not updated automatically when a player joins or leaves.
- Fix: [#26639] Handymen could begin a task while another handyman was already doing the exact same task.
- Fix: [#26752] The Cut-away View window doesn’t display negative height values correctly on some platforms.
- Fix: [#26756] Guests cannot puke or litter on sloped path.
- Fix: [#26758] [Plugin] IPv6 addresses are reported incorrectly.
- Fix: [#26775] Maze gets wrong intensity boost from size (0.02 per tile instead of 0.01 per 2 tiles).
- Fix: [#26805] Park entrance path is sometimes invisible when placed.
- Fix: [#26826] Invalid ride types can be set when the “Allow arbitrary ride type changes” cheat is enabled.
- Fix: [#26842] Best staff award doesn’t need one of each staff type.
2026-08-02 07:38:40 -03:00
mix a4f0d22988 Fix #26288: Land bordering map edges does not blend at certain angles (#26844)
The current surface tiles position was being set to session.SpritePosition, which changed depending on the camera angle, rather than session.MapPosition. Depending on the camera angle, this puts the current tile position out of bounds at the edges of the map, skipping the blend.

This fixes that, and then adjusts the neighbouring tile coordinates so that they work for the correct starting position. These now make a lot more sense, the previous coordinates were quite strange in order to compensate for the original offset position.

This also renames that array of coordinates to a better name. As far as I know this array doesn't already exist elsewhere.

The current surfaces position is only being used to check when blending, so this should not affect anything else.

I've checked by diffing giant screenshots of a couple of parks at all rotations and found no other differences, but this could probably do with a double check.
2026-08-02 07:46:54 +00:00
MarcelVos96 d81c3a7f14 Fix #26842: Best staff award doesn't need one of each staff type (#26843) 2026-08-01 20:22:13 +00:00
RayKoopa e555c76500 Prevent setting invalid (not unknown) ride types (#26826) 2026-08-01 21:59:33 +02:00
Aaron van Geffen ac6030f011 Magnify picked-up peeps when viewport is in double or quadruple zoom (#26839) 2026-07-29 10:38:53 +00:00
Ben SpurlockandCursor 0fc88ab16c [Plugin API] Automation helpers for park directors and programmatic ride building (#26675)
* [Plugin API] Add automation helpers for park directors and ride building

Expose ride maintenance metrics, context.gameSpeed, map bulk queries,
riderefurbish action alias, FootpathElement.isAdditionFull, and
TrackSegment.getNextValidSegments. Bump plugin API version to 115.

Includes TrackPieceSelection from markusklock's work (#25840).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add PR #26675 to distribution/changelog.txt

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: clang-format and changelog ordering

Reorder 0.5.3 changelog entries and apply format-changelog.js output.
Apply clang-format fixes to ScriptEngine.cpp and ScMap.cpp.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix contributor name to Ben Spurlock (BenDaSpur)

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix changelog EOF for CI check-changelog-formatting

Remove trailing blank line so the file matches formatter output via
echo (bash strips trailing newlines from command substitution).
Also correct contributor name to Ben Spurlock (BenDaSpur).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove #25840 TrackPieceSelection overlap from PR #26675

Per maintainer feedback, drop TrackSegment.getNextValidSegments and the
TrackPieceSelection implementation copied from markusklock's open PR #25840
so this change set can be reviewed independently. Those additions will be
picked up when #25840 lands.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify plugin API per maintainer review

Drop the riderefurbish alias and bulk map query APIs in favor of existing
primitives, and consolidate the changelog entry.

* Fix isAdditionFull to only report visibly full / emptiable bins

Per review feedback, a litter bin slot is only "full" (shows the full
sprite and can be emptied by a handyman) once its 2-bit edge slot reaches
0, not whenever the status byte is below 255. Mirror the engine's own
Staff::updatePatrollingFindBin logic and require the addition to be a bin.

* Remove unused includes left over from dropped APIs

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 09:16:29 +02:00
mix d92b18f978 Initialise pathTypeIsLegacy in ParkEntrancePlaceAction constructor (#26805) 2026-07-18 20:45:19 +00:00
RayKoopa b7ec766a62 Update player automatically when a player joins or leaves (#26610)
Send intent to refresh list when a player joins / leaves / has group changed.
2026-07-16 20:21:36 +02:00
Aaron van Geffen a6d9cebff9 Make cut-away view clip height rounding more deterministic (#26774) 2026-07-15 21:22:27 +00:00
mhlas7 50d91c4e5f Let handymen check if a tile is being serviced by another handyman (#26639) 2026-07-15 17:52:38 +02:00
MarcelVos96 a85b40b3ef Fix #26775: Maze gets wrong intensity boost from size (#26776)
Intensity boost was 0.02 per tile instead of 0.01 per 2 tiles.
2026-07-11 16:30:12 +00:00
mhlas7andGymnasiast 6903d5310e Let guests no longer watch rides when underground (#26638)
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2026-07-11 07:50:38 +00:00
Aaron van Geffen 3f7eca60f2 Rework ride operations tab (#26765)
* Split OperatingOnPrepareDraw into two functions: one for mode, one for wait/load

* Set up modular operating and load widget positioning

* Drop horizontal rule between mode settings and depart settings

* Fix button width calculation in resizeSpinner, resizeDropdown

* Hide mode/load group boxes when not applicable to ride

* Add changelog entry
2026-07-09 17:56:01 +00:00
Aaron van Geffen 7393fbc661 Add group boxes to ride colour tab (#26763) 2026-07-09 15:15:34 +00:00
MaukWM 1ef6b7e941 Add save game binding in plugin API (#26560)
* Add context.saveGame() binding in plugin API.

* Add option to save games to a specific path via the plugin API.

* Alter documentation for SaveGameOptions.

* Bump kPluginApiVersion to 116.

* Use IsFilenameValid to disallow saving files with invalid characters

* Add changelog entry
2026-07-08 11:40:39 +00:00
Gymnasiast 9e59499360 Amend changelog 2026-07-08 13:10:25 +02:00
RayKoopaandMarino Rottier 33e10e4783 Fix IPv6 addresses in the plugin API (#26758)
Properly pass the `sockaddr_in` pointer instead of its address to `reinterpret_cast`.

Co-authored-by: Marino Rottier <mail@vanmarino.nl>
2026-07-07 17:41:28 +00:00
73chn1cand73chn1c 229d35bce2 Document ListViewItem shape for multi-column list views (#26746)
Clarify that items is string[][] (one string[] row per entry) when
columns are used, not a flat string[], per confusion reported in #17855.

Co-authored-by: 73chn1c <73chn1c@users.noreply.github.com>
2026-07-07 19:33:45 +02:00
MarcelVos96 b4bdc95c62 Fix #26756: Guests cannot puke or litter on sloped path (#26757) 2026-07-07 19:30:43 +02:00
Michał Janiszewski 0b0f1336b4 Start v0.5.4 2026-07-05 18:54:51 +02:00
Michał Janiszewski f503f57bdb Release v0.5.3
- Feature: [#26308] Add all new track pieces to the inverted roller coaster.
- Feature: [#26442] Add cheat to disable grass growing.
- Improved: [#7921] On Linux, RCT2 and RCT1 installs in Wine are now automatically detected.
- Improved: [#26325] Changing the train type, length, or direction no longer resets the number of laps if there is just one train.
- Improved: [objects#437] Re-order St. Basil’s Cathedral pieces to be more consistent.
- Change: [#26689] A clear scenario editor can now be opened directly from the command line.
- Change: [objects#439] Drop numbers from Wacky Worlds scenery descriptions.
- Fix: [#24613] Incorrect sprites drawn for path elements without a valid object.
- Fix: [#26323] Ride stats do not reset when changing the number of trains changes the number of laps.
- Fix: [#26494] The limits for where walls on the path side of the first tile block the view of rides/scenery are wrong (original bug).
- Fix: [#26504] The boosts/penalties to excitement and nausea that air time provides are calculated wrong.
- Fix: [#26545] Game crashes when plugin API function generateGuest fails to generate a guest.
- Fix: [#26578] Crash when drawing path elements without a valid object.
- Fix: [#26605] Desync when placing a track design in multiplayer.
- Fix: [#26654] Fix Alton Towers stall and Rock’n’Roll Revival toilet being closed on scenario start.
- Fix: [#26722] Missing construction rights owned on UCES Sand Dune scenario.
- Fix: [objects#411] Some colours in green, acid green, pink and red water are inconsistent with natural water.
- Fix: [objects#436] St. Basil’s Cathedral building pieces are incorrectly labelled as “Kremlin” pieces.
- Fix: [objects#438] Some walls are not marked as see-through while they don’t fully block the view.
- Fix: [objects#440] Inconsistencies in scenario/park name capitalisation.
2026-07-05 18:24:58 +02:00
Tulio Leao 069d0aea8b Fix #26722: Missing construction rights owned on UCES' Sand Dune (#26725) 2026-06-27 08:54:40 -03:00
Daniel Rödl 4da7daa2f9 Fix OpenRCT2#7921: Search in user's wine path for RCT2 and RCT1 install files (#26292) 2026-06-25 20:41:25 +02:00