1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00
Commit Graph

146 Commits

Author SHA1 Message Date
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
Aaron van Geffen
05e56517ab Adopt existing namespaces into OpenRCT2 namespace (#22368)
* Put all of TitleSequenceManager into the same namespace

* Move RideConstructionState into the OpenRCT2 namespace

* Adopt existing namespaces into OpenRCT2 namespace

This adds `using namespace OpenRCT2` to compilation units where appropriate,
as a means to get the codebase to compile until these units have been placed
in a namespace of their own.
2024-07-26 09:59:58 +02: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
Aaron van Geffen
b5ef2693b0 Remove common.h include from all units 2024-07-09 16:45:19 +02:00
Arnold Zhou
aa11d8ddfe Expose ride satisfaction to plugin api (#22172) 2024-07-08 10:53:14 +02:00
Aaron van Geffen
83e5aeb9c5 Increment versions for park format, script engine, network for new flags 2024-07-06 15:14:12 +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
Stephan Spengler
f4156e9043 Create or delete banners when tile elements are changed by plugins (#21627) 2024-05-17 07:54:51 -03: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
Stephan Spengler
2913a0686a Add banner properties to plugin API for large scenery, walls and banners 2024-03-26 11:42:09 +00: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
ζeh Matt
84213efde2 Fix using iterators that are deleted by the plugin 2024-01-25 17:01:00 +02: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
ζeh Matt
8bcd409fb0 Fix #21145, #21158: Keep handles for intervals stable and resolve crash 2024-01-06 10:42:17 +02: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
0ffbd65576 Bump plugin API version 2023-10-08 02:30:55 +03:00
Stephan Spengler
39ecab4bd2 add small scenery tertiary colour to plugin API (#20818)
* add small scenery tertiary colour to plugin API

* bump API version
2023-10-01 11:27:04 +01:00
duncanspumpkin
a6bed128b5 Bump scripting version 2023-09-26 19:05:02 +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
Luke Hobbs
27eec48c16 Fix formatting 2023-06-02 22:55:45 -04:00
Luke Hobbs
c1f75a0906 Add plugin name to CustomAction and ScriptEngine 2023-06-02 22:04:05 -04:00
Ted John
d3a65443f2 Increment plugin API version 2023-05-02 20:28:14 +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
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
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
Stephan Spengler
2fd3eb47e7 SetCheatAction has wrong ID in plugin API 2023-04-18 13:23:44 +02: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
kyphii
39790779bb Extend color selection dropdown with more colors (#19446)
* Setup for extended palette

* Define order for color picker cells

* Init G2 Palettes in ColoursInitMaps

* Add Glass Palettes

* Use special sprite for Invisible color

* Set up new cheat for special colors

* Add glass palettes to palette_to_g1_offset

* Add entries for new colors in TranslucentWindowPalettes

* Finish implementation of special colors cheat

* Some cleanup

* New colors almost work

* Correct g2 palette loading indices

* Invisible color sprite displays properly

* Repaint works with large scenery and walls

* Prevent random shop items from overflowing to junk palettes

* More cleanup

* Fix glass palettes

* Add mapping of new colors to original colors for UI themes

* Fix junk palettes for random shop items

* Fix missing highlight color in software renderer

* Convert small scenery support flag to allow use of new colors

* Progress on displaying new colors in software renderer

* Fix invisible color scheme sprite

* Formatting cleanup

* Resolve comparison of integer expressions of different signedness

* Index g2 palette maps to fix visible chain lift

* Progress on fixing new colors in software renderer

* Fix station and support colors

* Fix dropdown selected index

* Get invisible color (mostly) working in software renderer

* Use forceBmp for palette resources

* Remove test function definition left in by mistake

* Remove some obsolete range checks for original color values

* Add changelog entry

* Reorder color dropdown based on NE user feedback

* Some cleanup

* Further cleanup

* Formatting

* Add include for GetPaletteMapIndexForColour

* Fix a couple things I broke

* Fix function placement

* Revert "Add include for GetPaletteMapIndexForColour"

This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759.

* Use color constants for color order list

* Make remappable colors contiguous

* turn off clang format for ordered color list

* Appease clang

* Use all colors for random shop item animation

* Improvements to palette map resources

* Fix chain lifts again + adjustments to a few colors

* Update changelog and contributors.md

* Revert changes to S4 and S6 importers which are no longer needed

* Bump network, plugin, and minimum park versions

* Revert "Progress on displaying new colors in software renderer"

This reverts commit 337602e4a7.

* Remove unnecessary comment

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 08:36:07 +01:00
X123M3-256
3c4e32458a Add large sloped turns to hybrid and single rail (#19547)
* Implement large sloped turns

* Fix formatting

* Add sprites

* Fix large turns button being active on steep slopes

* Remove bad comment

* Increment network,plugin,park version numbers

* Update changelog

* Increment park file version again
2023-04-05 13:47:56 +01:00
Matthias Moninger
7e48b57d6a Fix #18986: Sending remote scripts larger than 63KiB crashing all clients. (#19573)
* Fix #18986: Sending remote scripts larger than 63KiB crashing clients

* Add GetRemotePlugins in ScriptEngine

* Bump up network version

* Update changelog.txt
2023-03-06 13:50:05 +01: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
f8ab17749d Rename CheatSetAction to fit naming pattern 2023-01-06 22:57:15 +01: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
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
Stephan Spengler
bd6e572dbc add all game actions and their documentation to plugin API (#18826) 2022-12-16 21:38:45 +00:00
spacek531
44100234c3 Fix #18665, #18559: Add API for getting g2 icons by name
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2022-12-12 23:03:16 +00:00
Michał Janiszewski
e0bff8ef82 Update plugin API version for duktape version change (#18556)
Duktape got upgraded 2.6.0 -> 2.7.0 in #18485
2022-11-12 07:10:35 +01:00
Stephan Spengler
2aa46a7dca Change type of listviews from 'scroll_view' to 'listview'. (#18449) 2022-10-26 18:51:16 +01:00
Stephan Spengler
9e1937d144 [Plugin] Widget tooltips can now be read and changed 2022-10-03 20:50:19 +02:00
73
b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00