Commit Graph
74 Commits
Author SHA1 Message Date
Michael Steenbeek 52b70703af Turn TrackElemType into a strong enum 2024-10-11 13:30:27 +00:00
Aaron van Geffen 584f6b8661 Rename Peep::SpriteType to AnimationGroup 2024-09-22 16:54:33 +02:00
Aaron van Geffen 6d27369ea6 Rename PeepSpriteType to PeepAnimationGroup 2024-09-22 16:42:27 +02:00
Aaron van Geffen 58f33ca325 Rename PeepAnimationType::Ui to Hanging 2024-09-22 16:21:32 +02:00
Aaron van Geffen 48a71461bf Rename PeepAnimationType::StaffCheckboard to StaffCheckBoard 2024-09-22 16:18:41 +02:00
Aaron van Geffen b70aaea31e Rename ActionSpriteImageOffset to AnimationImageIdOffset 2024-09-22 16:13:49 +02:00
Aaron van Geffen 24b36915ef Rename ActionFrame to AnimationFrameNum 2024-09-22 16:12:04 +02:00
Aaron van Geffen ee7bb61bb0 Rename WalkingFrameNum to WalkingAnimationFrameNum 2024-09-22 16:10:04 +02:00
Aaron van Geffen 2edf8b472a Rename (Next)ActionSpriteType to (Next)AnimationType 2024-09-22 16:08:58 +02:00
Aaron van Geffen 435cf14d49 Rename PeepActionSpriteType to PeepAnimationType 2024-09-22 16:07:35 +02:00
Harry Hopkinson c1ac7c0700 Cleanup gameState usage 2024-09-02 22:42:37 +02:00
Guy SviryandGuy 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
mrmbernardi 9ed5c63857 Rename Location.hpp constants (#22385) 2024-07-26 10:23:25 +02:00
Guy SviryandGuy 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 896eb4f488 Consolidate FormatStringIDLegacy, FormatStringToUpper into Formatting 2024-07-13 14:09:58 +02:00
Aaron van Geffen 8134ca069a Move kMarketingCampaignNames to Marketing unit 2024-07-12 23:56:22 +02:00
Aaron van Geffen b5ef2693b0 Remove common.h include from all units 2024-07-09 16:45:19 +02:00
Aaron van Geffen f2c266d310 Allow scripts to manipulate peep directions 2024-07-05 15:46:03 +02:00
Aaron van Geffen 666e8a1518 Prevent assigning invalid energy values to peeps 2024-06-29 16:05:54 +02:00
Aaron van Geffen ed6bde7d56 Introduce peep flags for static positions and animations 2024-06-29 14:42:09 +02:00
Arnold Zhou 0254b570d8 Dukvalue uint int fixes 2024-06-06 21:39:22 +02:00
spacek531 4ea55ef415 Change ScVehicle::isReversed_get/set to template function 2024-06-04 13:06:20 +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
Aaron van Geffen 04fa09e8df Allow mechanics to be assigned the drowning animation (#22071) 2024-05-20 22:36:33 +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
Aaron van Geffen 17920b6039 Script: when changing staff type, reset state to walking
Reset state to walking to prevent invalid actions from carrying over
2024-05-01 23:10:25 +02:00
Michał Janiszewski 7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Claudio Tiecher b60483f25d Part of #21421: Refactor VEHICLE_SEAT_NUM_MASK 2024-03-25 16:17:32 +01:00
Duncan 1d3bd31ab8 Deduplicate FormatStringID symbols 2024-03-10 18:15:49 +00:00
Katherine NortonandTulio Leao 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
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
kyphiiandTrevor Finney 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
ζeh Matt 2f8e208a9d Refactor sprite_index to Id 2023-01-27 19:21:57 +02:00
Duncan 09611cd9a5 Remove snake_case from OpenRCT2/entity folder 2023-01-17 21:16:36 +00:00
Michael Steenbeekandduncanspumpkin bf5f7e8e71 Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00: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
MatthewandTulio Leao d00c71399b Add guest thoughts to plugin API (#18732)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-12-29 12:56:11 -03:00
Duncan 406b73d904 Remove final snakes from map and world (#18304) 2022-10-12 09:14:45 -03: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
Bas 7b5aeece59 Implement plugin getters for subposition and subposition length 2022-09-02 23:18:29 +02:00
Duncan adc51ad9aa Rework rct_vehicle_colour (#16051)
* Remove rct_vehicle_colour and replace with VehicleColour

* Update network version

* Update replay version
2022-08-13 19:30:30 +00:00
Hielke Morsink e2da19f0f7 Add missing includes 2022-07-29 18:45:10 +02:00
Michael Steenbeek e78c29ea5c Fix most occurrences of ‘ternary’ (#16832) 2022-03-20 19:22:05 +01:00
Ted John dff1d730da Implement #13620: [Plugin] Add support for patrol areas to Staff 2022-03-13 19:30:50 +00:00
Bas b14c469232 Fix Car.rideObject from overflowing with more than 256 ride types 2022-02-23 21:33:40 +01:00
Hielke Morsink f47c1b9f96 Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
ζeh Matt cd261fc7b2 Use DukValue for scripted entity id_get 2022-02-16 19:51:50 +02:00