Commit Graph

291 Commits

Author SHA1 Message Date
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
ζeh Matt b4376ab590
Add owner property to tile elements for scripting 2023-10-08 02:30:43 +03:00
Andrew e17bca3b53
Made setting the game speed a game action (#20825)
* Bare minimum for a game action

* Changelog entry

* Fixed formatting

* Consistent capitalization

* Committed wrong file

* Removing redundant toolbar invalidations

* Bump network version; remove redundant qualifier

* Fixed crash on starting server
2023-10-04 16:13:40 +01:00
Crazycolbster a7881a5046
Fixed typo in openrct2.d.ts, ScenarioObjectiveType (#20592) 2023-07-10 22:14:30 +01:00
Matthias Moninger 3edb044685
Merge pull request #20100 from IntelOrca/plugin/object-manager
Add plugin APIs for the object manager
2023-06-26 02:26:13 +03:00
AuraSpecs 870c78001e
Add new roller coaster ride colour presets (#20119)
* Fix G2 order and format

PR #19446 did not follow the correct G2 order so this is fixing that.

Also adds the added icons to the [Plugin] chart as should when adding icons to G2.

* Add colour documentation

* Joker's Jinx colour

For the LIM Launched, based on Premier rides LIM RC.

* Poltergeist colour

Based on a Premier rides LIM RC

* Flight of Fear colour

* Add Mega-Lite colour scheme

* Add colours for Vertical Drop RC

* Add two HyperCoaster presets

Suggested by Kyphii

* Add Mako colour scheme

Suggestion by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add two colours to BM Invert

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Bobsleigh Preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Woodie Presets

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Looping RC preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Flying RC preset

Not based on one specifically, it just looks very nice.

* Update GCI Woodie preset

* Update Inverted RC's presets

Removed the skinworm and added a banshee colour scheme that you could find in the renders. Supports were a tad difficult but I think Violet pops the best with the rails so I decided to go for that.

* Change default Woodie LB Bl Bl to LB Bl DB

* Update ride presets for Twister RC

Removed Aquamarine and Moss Green because you can find Moss Green on the Flying already and Aquamarine is very close to the white.

The white I would probably change to Black & White and move it to the Wing RC once that ride type becomes available.

* Add colour presets for the 4th Dimension RC

* Add Hybrid RC presets

* Add two yellow themes for Impulse

May both rides rest in pieces

* Add colour documentation

* Joker's Jinx colour

For the LIM Launched, based on Premier rides LIM RC.

* Poltergeist colour

Based on a Premier rides LIM RC

* Flight of Fear colour

* Add Mega-Lite colour scheme

* Add colours for Vertical Drop RC

* Add two HyperCoaster presets

Suggested by Kyphii

* Add Mako colour scheme

Suggestion by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add two colours to BM Invert

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Bobsleigh Preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Woodie Presets

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Looping RC preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Flying RC preset

Not based on one specifically, it just looks very nice.

* Update GCI Woodie preset

* Update Inverted RC's presets

Removed the skinworm and added a banshee colour scheme that you could find in the renders. Supports were a tad difficult but I think Violet pops the best with the rails so I decided to go for that.

* Change default Woodie LB Bl Bl to LB Bl DB

* Update ride presets for Twister RC

Removed Aquamarine and Moss Green because you can find Moss Green on the Flying already and Aquamarine is very close to the white.

The white I would probably change to Black & White and move it to the Wing RC once that ride type becomes available.

* Add colour presets for the 4th Dimension RC

* Add Hybrid RC presets

* Add two yellow themes for Impulse

May both rides rest in pieces

* Add changelog entry

* Add Water Coaster colour preset

---------

Co-authored-by: kyphii <8711258+kyphii@users.noreply.github.com>
Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2023-05-21 18:02:28 +02:00
Ted John 0ed4bfbc4a Return null for legacyIdentifier 2023-05-02 20:28:14 +01:00
Ted John ffe5f74fa3 Update openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John c784084942 Update openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John 069a2b3192 Implement object manager for plugins 2023-05-02 20:28:14 +01:00
Ted John 9a20c47f86 Design APIs for loading / unloading objects 2023-05-02 20:28:14 +01:00
Ted John f95472c70a Add API for installed objects 2023-05-02 20:28:14 +01:00
Ted John 96ef163d51 Add new APIs to openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John f1ac4363ce Fix openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John bf3c6964be Remove scenery from object type names 2023-05-02 20:27:56 +01:00
Ted John 1a73a0be68 Implement other scenery objects 2023-05-02 20:27:56 +01:00
Ted John 2729956cef Add scenery group object interface 2023-05-02 20:27:56 +01:00
Ted John 530dfac7c9
Fix #20104: [Plugin] Some network APIs use player index and group index (#20115)
Change all APIs that took a player index or group index so that they now take unique IDs.
2023-05-02 15:25:05 +01:00
Die4Ever 74c1f5a695
Fix openrct2.d.ts duplicate slopes25Banked67 (#20065) 2023-04-27 18:53:24 +01:00
spacek531 1bbdba40b5
Implement paint code for spiral lifthill down (#19567)
* spiral lifthill down paintcode

* rename string anyway

* add some stuff I forgot and add documentation

* use static assert on SpriteGroupMultiplier

* add slope to list of opposite slopes

* bump scripting version

* update openrct2.d.ts

* improve documentation
2023-04-27 15:11:22 +01:00
Ted John 713bb09990
Merge pull request #19930 from IntelOrca/plugin/research
Add research plugin API
2023-04-21 21:17:34 +01:00
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
Ted John d471d7a4b7 Use strings for research category 2023-04-18 21:38:10 +01:00
Ted John fe3f32e82e Fix code review comments on research 2023-04-18 21:38:10 +01:00
Ted John 59f9d099b9 Update openrct2.d.ts 2023-04-18 21:38:10 +01:00
Ted John f35e595d0e Add research plugin API 2023-04-18 21:38:09 +01:00
Nikolas Parshook ef35dfa40a
Expose obj image offset and num images to plugins (#17567)
Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
2023-04-13 19:09:15 +00:00
spacek531 b1bb24aefb
Fill out TrackSegment API (#18478)
* add fields to track segment api

* add getTrackSegments to API

* change element to segment for continuity

* improve documentation

* continue tweaking documentation

* implement segment suggestions

* clarify purpose of isSteepUp flag

* add rest of track element flags

* remove extraneous information from comment

* continue tweaking API

* implement basssiiie suggestion

* rename angle to slope

* reorder items in the documentation

* bump plugin api
2023-01-25 22:05:18 +00:00
Basssiiie b15a6e843a
[Plugin] Wrap callback arguments for custom game actions in event arguments object, fix issue with unloading multiplayer plugins (#19091)
* Wrap custom game action arguments in event args object

* Update Typescript declaration, documentation and changelog

* Pass custom game action by value and remove log messages
2023-01-15 20:52:23 +00:00
Stephan Spengler 9c6032bb36
Fix: GameActionResult does not comply to API specification 2023-01-12 22:14:52 +01:00
Stephan Spengler bfcf66a8f7
Rename ParkSetEntranceFee to fit naming pattern 2023-01-06 22:57:18 +01:00
Stephan Spengler f8ab17749d
Rename CheatSetAction to fit naming pattern 2023-01-06 22:57:15 +01:00
Stephan Spengler 32dd535044
Rename MapChangeSizeAction to fit naming pattern 2023-01-06 22:57:11 +01:00
Stephan Spengler 8495dbf6a5
Fix type mistake introduced by #18428 (#19057) 2023-01-06 12:33:36 -03:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Basssiiie 8127a9ff96
Add IconName type to ButtonDesc image property 2022-12-30 20:20:02 +01:00
Matthew d00c71399b
Add guest thoughts to plugin API (#18732)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-12-29 12:56:11 -03:00
Michael Steenbeek 079d99d7b2
Require new plugins to specify a target API version 2022-12-20 16:34:38 +01:00