1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00
Commit Graph

328 Commits

Author SHA1 Message Date
mrmbernardi
5804508da4 Fix openrct2.d.ts Socket.on type (#25491) 2025-11-10 02:15:10 +11:00
Aaron van Geffen
f9e9cefb46 Add missing getCostumeStrings to openrct2.d.ts (#25227) 2025-09-21 17:11:39 +02:00
Michael Steenbeek
dd957d46e8 Fix spelling of ‘separate’ and ‘separator’ 2025-08-27 22:33:05 +00:00
Jan Strauss
0522ae848b Add award plugin APIs (#24468)
* Add award plugin apis

* Address review feedback (use erase_if, extract AwardAdd method)

* Address review feedback (remove redundant comments, make AwardAdd static)

* Address review feedback (bump plugin api version, add changelog entry)
2025-07-13 07:04:26 -03:00
Cory Sanin
7217558ad1 openrct2.d.ts style fixes 2025-07-09 08:59:38 +02:00
Cory Sanin
65b5d86e6c Feature: [Plugin] Add bindings for missing cheats
Added the following binds for completeness:
- ignoreRidePrice
- makeAllDestructible
- forcedParkRating*

`allowSpecialColourSchemes` was missing from the type definition file so I added that as well.

\*forcedParkRating required a little more logic than the boolean cheats and I added some safeguards to prevent setting invalid values
2025-07-08 09:18:25 +02:00
Max
5a95e5e27d Close #24313 - Add API for setting a car’s ‘isCrashed’ flag
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2025-05-12 21:42:46 +00:00
Max
08cb8cb8c3 Add plugin call for breakdowns (#24207) 2025-04-30 14:41:47 +00:00
Max
923a38c990 Close #24146: Expand plugin functionality for balloons and money effects 2025-04-19 23:23:02 +02:00
Guy Sviry
b92e05bc14 Scripting: Add Car.moveToTrack API (#23359)
* Scripting: Redraw vehicle when setting track location

* Scripting: introduce car.moveToTrack

A new function to move cars to tracks easier. Also redraws the car.

* Revert car.trackLocation to CoordsXYZD

reverts 30a555d3c2
car.moveToTrack() achieves the same thing in a saner API.

* Final fixes for vehicle.moveToTrack

added back tracklocation.Get with track type
added EntityTweener call at the end of travelBy/moveToTrack

* moveToTrack: final bassie review fixes.

* moveToTrack: use tile coords

* moveToTrack: api increment

---------

Co-authored-by: Guy Sviry <guy@axissecurity.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2025-04-02 23:42:30 +00:00
Alex
2f90184d50 Refactor rest of .d.ts file to use JSDoc-style comment notation (#24073)
* Refactor: Migrate rest of .d.ts file to use JSDoc-style comment notation

  - Adds markdown links for file references

  - Refactor inline lists into structured markdown lists

  - More verbose bitmask documentation

  - Adds @link fields where appropriate

  - Moves some comments from being inline to above the referenced line to allow for IDE notation

  - Fixes some broken/moved C file path references

  - Adds bitmask documentation for staff orders

* Fix: Type name

* Change: contributors.md file

* Remove outdated recommendation

* Change file links to github links

* Add comment applicability disclaimer

* Add link to LandSetRightsArgs ownership file

* Remove `ClimateSetArgs`
2025-03-28 22:49:09 +01:00
Aaron van Geffen
0a3e9fdfd9 Update object manager API to access new object types (#24009)
* Update object manager API to access new object types

* Use separate mapping for scripting due to different type names

* Amend changelog
2025-03-20 00:16:08 +01:00
Aaron van Geffen
6933af25ae Rename 'Climate' properties to Weather (#23786)
* Rename ClimateState to WeatherState

* Rename ClimateCurrent to WeatherCurrent

* Rename ClimateNext to WeatherNext

* Rename ClimateUpdateTimer to WeatherUpdateTimer

* Use named initialisers for weather state import in S4/S6 importers

* Rename S4::ClimateTimer to WeatherUpdateTimer as well

* Rename WeatherState struct properties to lowerCamelCase
2025-02-13 07:38:45 -03:00
Aaron van Geffen
80c9faeee1 Change StaffHireArgs params to reflect internal visitor (#23791) 2025-02-11 19:35:08 +02:00
Aaron van Geffen
805c8e2a11 Plugin: allow scripts to specify tab colour maps (#23583) 2025-01-13 23:47:30 +01:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
AT41
6e7b489304 Added additional stats to Plugin interface
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-10-03 11:23:50 +00:00
kendfrey
307523610e Add Park.generateGuest() to plugin API (#22883)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-10-02 06:49:43 -03:00
Duncan
e157a843f0 Large scenery object tiles for scripting (#22842)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-10-01 21:02:46 -03:00
Harry Hopkinson
89637013e8 Fix #21507: Expose suggestedGuestMaximum via hook (#21521) 2024-09-11 21:17:26 -03:00
Guy Sviry
332df0f1db expose Vehicle.spin_sprite to Car scripting (#22392)
* expose spinSprite to Car scripting

---------

Co-authored-by: Guy Sviry <guy@axissecurity.com>
2024-08-07 18:13:33 +01:00
Guy Sviry
30a555d3c2 Expose vehicle.trackType to scripting (#22272)
Co-authored-by: Guy Sviry <guy@axissecurity.com>
2024-07-25 17:27:15 -03:00
Arnold Zhou
a749698566 [Plugin API] Feat: Expose staff statistics (#22184) 2024-07-24 20:10:34 -03:00
Stephan Spengler
ba779ac64c Change ToolEventArgs.mapCoords from CoordsXYZ to CoordsXY
Testing showed that the event returns CoordsXY instead of CoordsXYZ. The code can be traced back to InteractionInfo.Loc (Viewport.h), which is CoordsXY.
2024-07-24 16:42:02 +02:00
Arnold Zhou
2da5ed6517 [Plugin API] Fix: add missing hook types, order & style (#22134) 2024-07-23 07:49:57 -03:00
Arnold Zhou
376e749a70 Allow plugins to focus on textboxes in custom windows (#22213) 2024-07-08 14:49:15 +02:00
Arnold Zhou
aa11d8ddfe Expose ride satisfaction to plugin api (#22172) 2024-07-08 10:53:14 +02:00
Aaron van Geffen
f2c266d310 Allow scripts to manipulate peep directions 2024-07-05 15:46:03 +02:00
Aaron van Geffen
ed6bde7d56 Introduce peep flags for static positions and animations 2024-06-29 14:42:09 +02:00
spacek531
4e72d580f8 Allow non-networked plug-ins to set pause state directly 2024-06-25 11:36:01 +02:00
Arnold Zhou
a0f5d09408 Expose monthly expenditure history to plug-in API 2024-06-23 22:49:49 +02:00
Stephan Spengler
73043106ed [Plugin] Add banner index to banner creation result 2024-05-29 22:35:35 +02:00
spacek531
94750f4e34 Add plugin API to VehicleCrashedParticle 2024-05-29 12:32:41 +02:00
Arnold Zhou
01319ff352 Expose guest's favourite ride (ID) to plugin API 2024-05-27 15:18:02 +02:00
Harry Hopkinson
68f2b0f207 Close #18829: Add g1 icons to scripting 2024-05-26 21:48:42 +02:00
Stephan Spengler
7315b3bdbf Adjust API documentation to changes from #22013 2024-05-22 23:47:21 +02:00
Ted John
abc67f09e6 Add ability to shift map 2024-05-18 21:10:52 +02:00
Aaron van Geffen
893392d987 Scripting: allow precise and safe control of peep animations 2024-05-05 21:09:41 +00:00
Aaron van Geffen
831c7651bb Scripting: tailor costume assignment to each staff type
In order to transition staff costumes to objects, we must further disentangle staff from regular peeps. This has many advantages, such as making custom entertainers or even handymen costumes. However, this means putting some restrictions on what costumes can be assigned to staff in the mean while.

We are aware of plug-ins allowing staff to be decorated like normal peeps, though, e.g. using @Manticore-007's Peep Editor. Splitting staff from peeps will mean breaking such functionality. We can do our very best to reverting 'invalid' staff to their normal outfits instead of them outright disappearing. However, in the mean time, we should disallow peep costumes from being assigned to staff to prevent further disappointment down the line.

Once we get to actually adding custom staff costumes, I plan to add a new plug-in API to get available costumes for a particular staff type. This would apply to entertainers, but also other staff types. This should make it easier for plug-in authors to tap into custom costumes in the future.
2024-05-05 22:41:52 +02:00
Katherine Norton
cd528665e6 Expose whether the game is paused to the plugin API 2024-05-03 15:59:57 +00:00
Aaron van Geffen
d536f9bce0 Revert "Add owner property to tile elements for scripting"
This reverts commit b4376ab590.
2024-04-12 21:58:45 +02:00
Stephan Spengler
2913a0686a Add banner properties to plugin API for large scenery, walls and banners 2024-03-26 11:42:09 +00:00
Stephan Spengler
304ce22756 Improve research documentation for plugin API 2024-03-21 14:11:52 +01:00
Stephan Spengler
01248c26a4 Improve API documentation: use Direction type in FootpathElement
Change type of slopeDirection and queueBannerDirection of footpaths to Direction in openrct2.d.ts
2024-03-06 18:22:50 +01:00
Alex Parisi
efb6d48c4c Add plugin API to get registered plugin metadata (#20709)
* Added API for getAllPlugins

Added functionality to the Scripting API to allow Contexts to return a list of all registered plugins.

* Fixed naming conventions, returning list of authors

Changed function names to follow get/set convention. Removed unnecessary copies of shared pointers, now using auto instead. Changed the functionality to return an array of authors instead of a string.

* Added changelog entry

Also added myself to list of contributors

* Moved all functionality to ScPlugin

Created a ScPlugin class and moved the current getPlugins functionality there.

* Changed from method to property

Function names now match the get/set convention for properties. Also did some code cleanup.

* Update copyright

* Bump plugin version

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-02-16 05:53:48 -03:00
Katherine Norton
0450435377 Add Plugin API for managing a guest's items (#21062)
* Add API for guest items in openrct2.d.ts

* Create GuestItem interfaces

* Set fields to readonly and add documentation

* Implement getting items array

* Implement checking if a guest has an item

* Implement removing items from guests

* Implement giving a guest an item

* Re-merge GuestItemType with FoodDrinkType

* Add more data validation for the EnumMaps

* Update versioning and changelog

* Add some errors to the give_item method

* Bump network version

* Update VoucherType to if/else

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Add static_assert to ScGuest.hpp

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-01-20 11:51:23 -03:00
Stephan Spengler
e8a7bc43b3 Plugin documentation: Added missing field to SmallSceneryElement 2024-01-15 12:42:40 +01:00
Matt
c137d20a0b Merge pull request #21163 from fidwell/plugin-api-SmallSceneryPlaceArgs
Plugin documentation: Added missing required field to SmallSceneryPlaceArgs
2024-01-06 20:02:45 +02:00
Andrew
2768716238 Added missing required field to SmallSceneryPlaceArgs 2024-01-06 11:28:00 -05:00
James103
1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00