Commit Graph
493 Commits
Author SHA1 Message Date
Gymnasiast d943171fae Create enum class for EntranceType 2026-08-12 16:16:07 +02:00
Gymnasiast 631804fd13 Make WallElement members adhere to code style 2026-08-12 15:17:55 +02:00
Gymnasiast 84f1946db8 Make TrackElement members adhere to code style 2026-08-12 15:17:50 +02:00
Gymnasiast 25865dce31 Make SurfaceElement members adhere to code style 2026-08-12 15:17:44 +02:00
Gymnasiast d3c54532ca Make SmallSceneryElement members adhere to code style 2026-08-12 15:17:39 +02:00
Gymnasiast 2f9db0a5d4 Make PathElement members adhere to code style 2026-08-12 15:17:34 +02:00
Gymnasiast 95025ba916 Make LargeSceneryElement members adhere to code style 2026-08-12 15:17:29 +02:00
Gymnasiast 4af2e9d1fd Make EntranceElement members adhere to code style 2026-08-12 15:17:23 +02:00
Gymnasiast be98df4081 Make BannerElement.h adhere to code style 2026-08-11 22:19:46 +02:00
Gymnasiast ac2515d483 Make TileElement.h adhere to code style 2026-08-11 22:17:52 +02:00
Gymnasiast 24869300df Rename VehicleSpriteGroup member function to adhere to code style 2026-08-09 17:08:45 +02:00
Gymnasiast a629158a4b Rename SpriteGroupNames to kSpriteGroupNames 2026-08-09 17:08:45 +02:00
Gymnasiast 5c0fc86397 Rename CarEntry members to adhere to code style 2026-08-09 17:02:34 +02:00
Gymnasiast 8b4b1c6561 Refactor VEHICLE_VEHICLE_* to two enum classes 2026-08-09 16:30:50 +02:00
Gymnasiast f08bc61f03 Refactor park flags into enum class+FlagHolder 2026-08-08 18:49:32 +02:00
Gymnasiast a70874710a Refactor peep flags to enum class+FlagHolder 2026-08-08 18:28:22 +02:00
Harry Hopkinson 8cd44cc686 Remove openrct2/world includes 2026-08-08 00:04:30 +01:00
Harry Hopkinson 6c5c2079ce Remove openrct2/scripting includes 2026-08-07 23:54:10 +01:00
Aaron van Geffen 4087c9c6b9 Rework script binding includes (#26882)
* Rework entity binding includes

* Rework network binding includes

* Rework object binding includes

* Rework ride binding includes

* Rework world binding includes
2026-08-07 18:11:06 +02:00
Aaron van Geffen 51649e5873 Rework Ride and Vehicle headers into OpenRCT2 namespace (#26881)
* Move vehicle flags to their own header

* Move Ride, RideConstruction, RideRatings, Vehicle into OpenRCT2 namespace

* Rename to SpecialDropdownElement as suggested
2026-08-07 16:22:36 +02:00
Gymnasiast 9bd1e0c858 Rename members of ObjectGeneration 2026-08-07 06:57:36 +02:00
Gymnasiast 3fa93c3278 Rename members of Weather::Type 2026-08-07 06:57:33 +02:00
Gymnasiast 0ab5cb5c49 Rename members of ScConfigurationKind 2026-08-02 20:09:03 +02:00
Gymnasiast 47c1bf9166 Rename members of SpriteGroupType 2026-08-02 20:00:55 +02: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
Michael Steenbeek 1be4d6d94b Update TileElementType to use new codestyle (#26766) 2026-07-09 17:50:25 +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
mrmbernardi a64f0eff6c Fix crash when ScPark::generateGuest fails to generate a guest (#26681) 2026-06-16 20:24:53 +02:00
MarcelVos96 86f282f7c0 Add cheat to disable grass growing (#26442) 2026-06-09 23:03:27 +02:00
Stephan SpenglerandTulio Leao bcdac632a4 Add footpath object flags to API (#26322)
* add footpath object flags to API

* Add changelog

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2026-06-06 16:31:03 -03:00
mgiannopoulos24 ab47bbd5d9 Rename Guest entity members (#26625) 2026-05-30 14:21:37 +00:00
mgiannopoulos24 d85835a0a0 Rename Staff entity members (#26603)
* Rename Staff entity member fields

* Rename Staff entity methods for consistency

* Remove unused EntertainerCostume enum class
2026-05-28 12:28:45 +02:00
mgiannopoulos24 d841b2dcec Rename Litter entity members (#26597)
* Rename Litter entity members

* Rename `Serialise` → `serialise` in all entity types called from GameStateSnapshots.cpp.
2026-05-21 21:21:42 +02:00
Harry Hopkinson 9d5e532064 Rename enum members to lowerCamelCase in actions/ (#26593)
* Rename enums in LoadOrQuitAction.h

* Rename enums in ScenarioSetSettingAction.h

* Rename enums in TileModifyAction.h

* Rename enums in NetworkModifyGroupAction.h

* Rename enums in LandBuyRightsAction.h

* Rename enums in LandSetRightsAction.h

* Rename enums in ParkSetParameterAction.h

* Rename enums in PeepPickupAction.h

* Rename enums in StaffSetPatrolAreaAction.h

* Rename enums in RideFreezeRatingAction.h

* Rename enums in RideSetAppearanceAction.h

* Rename enums in RideSetSettingAction.h

* Rename enums in RideSetVehicleAction.h

* Rename enums in BannerSetStyleAction.h
2026-05-21 19:16:07 +00:00
Harry Hopkinson 9780eead48 Rename JumpingFountain and move paint code to paint/entity (#26571)
* Move JumpingFountain paint code to paint/entity

* Rename Fountain files to JumpingFountain

* Rename PaintFountain to PaintJumpingFountain
2026-05-20 18:34:41 +02:00
Marino Rottier 6c6acd527b Rename TileElementBase members (#26522)
* Rename TileElementBase members to camelCase

* Rename RCT12TileElementBase and RCT12TileElement members to camelCase
2026-05-17 13:21:16 +00:00
Marino Rottier ce23b3c644 Rename Management members (#26530)
* Rename Award members to lowerCamelCase

* Rename MarketingCampaign members to lowerCamelCase

* Rename ResearchItem members to lowerCamelCase

* Rename News::ItemQueues members to lowerCamelCase

* Rename News::ItemQueue members to lowerCamelCase
2026-05-17 14:58:29 +02:00
Marino Rottier c9ba4eee98 Rename Network members (#26523)
* Rename Network::Player members to camelCase

* Rename Network::NetworkGroup members to camelCase

* Rename Network::Connection members to camelCase

* Rename NetworkServerAdvertiser members to camelCase

* Rename NetworkAction members to camelCase

* Rename NetworkActions members to camelCase

* Rename Network::User members to camelCase

* Rename Network::UserManager members to camelCase

* Rename PacketLegacyHeader members to camelCase

* Rename Network::Packet members to camelCase
2026-05-17 12:57:47 +00:00
Marino Rottier 66e1411d84 Rename EntityBase and EntitySpriteData members (#26520)
* Rename EntitySpriteData members to camelCase

* Rename EntityBase members to camelCase
2026-05-17 11:21:59 +00:00
mgiannopoulos24 11a3a5c373 Rename MoneyEffect members (#26556) 2026-05-17 11:03:11 +00:00
mrmbernardiandTulio Leao 6b81c4efec Fix JS socket issues (#26539)
* Fix Qjs sockets

* Add changelog entry

* Fix changelog ordering

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2026-05-17 09:45:31 +00:00
Alex Parisi 9acd252249 Fixing out-of-bounds enum lookup (#26559)
* Fixing out-of-bounds lookup

* Omit unmappable voucher fields
2026-05-16 22:26:55 -03:00
73 08ca5ec987 Fix copyright years in files that state 2025 still (#26540) 2026-05-16 17:51:22 +02:00
Max efb268af7d Add ride breakdown hook for scripting (#24243) 2026-04-18 03:25:23 +00: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
Aaron van Geffen 001df30eb5 Require ParkData& param for most Park functions 2026-02-13 14:36:05 +01:00
Michael Bernardi 7aa5a067d1 Review fixes 2026-04-01 02:19:02 +11:00
Michael Bernardi 79e10f98d5 Fix ScSocket 2026-04-01 02:19:01 +11:00
Michael Bernardi 421530c3ea Use class prototypes for all script types. 2026-04-01 02:19:01 +11:00
16cd1c07ff Swap Duktape for quickjs-ng
Co-authored-by: Basssiiie <Basssiiie@users.noreply.github.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2026-04-01 02:18:36 +11:00