Commit Graph
410 Commits
Author SHA1 Message Date
ZehMatt d558920606 Move ScParkMessage into its own files 2021-08-11 22:15:36 +03:00
ZehMatt 437321ac8f Move ScMap code into cpp 2021-08-11 22:15:36 +03:00
ZehMatt 53c5519cb3 Fix missing include and guard functions with network macro 2021-08-11 22:15:36 +03:00
ZehMatt 1848dd7839 Remove copy paste mistake #pragma once 2021-08-11 22:15:36 +03:00
ZehMatt 2bd348c39e Move ScRide into a cpp file 2021-08-11 22:15:36 +03:00
ZehMatt fe57dece6b Move ScRideStation into its own files 2021-08-11 22:15:36 +03:00
ZehMatt 99eee53c60 Move ScNetwork and ScPlayer into their own files 2021-08-11 22:15:35 +03:00
ZehMatt 64b57734e1 Move ScPlayerGroup into its own files 2021-08-11 22:15:35 +03:00
ZehMatt 68a795d607 Fix include 2021-08-11 22:15:35 +03:00
ZehMatt 371bbc0675 Move ScLitter to its own files 2021-08-11 22:15:35 +03:00
ZehMatt 2e951877cb Move ScPeep ScGuest and ScStaff to their own files 2021-08-11 22:15:35 +03:00
ZehMatt 33e2878d2d Move ScVehicle into its own files 2021-08-11 22:15:35 +03:00
ZehMatt 82451b031a Fix declaration 2021-08-11 22:15:34 +03:00
ZehMatt 244025ec17 Fix includes 2021-08-11 22:15:34 +03:00
ZehMatt adf5829cd6 Re-arrange structure of scripting 2021-08-11 22:15:34 +03:00
Michael Steenbeek 1168425f14 Fix compilation on Ubuntu 20.04 / GCC 9 2021-08-11 16:37:42 +02:00
Basssiiie 23bae61b7a Add new plugin API properties to entity, ride and park 2021-08-11 13:54:00 +02:00
ZehMatt 29e5ec634c Add litter entity to scripting 2021-08-07 22:28:48 +03:00
ZehMatt 94daa1e42c Bump up scripting version 2021-08-07 22:05:15 +03:00
ZehMatt 5e3913965d Add scripting API to create entities 2021-08-07 22:05:14 +03:00
ZehMatt c1d97b845e Small cleanup in ScMap.hpp 2021-08-07 22:05:14 +03:00
Michael Steenbeek e3c918ba5b Merge pull request #15174 from ZehMatt/scripting/deperecate-peep
Deprecate peep in scripting
2021-08-07 20:45:48 +02:00
ZehMatt 900f9c9190 Apply code review 2021-08-07 20:33:43 +03:00
ZehMatt aa2b7d9972 Deprecate peeps property in scripting for Car entity 2021-08-05 17:16:42 +03:00
ZehMatt a7bef5442b Allow plugins to target a specific API version 2021-08-05 17:16:42 +03:00
ZehMatt af102e391e Return correct entity type, API breaking change 2021-08-05 17:16:42 +03:00
ZehMatt 8f23670df8 Bump up scripting version 2021-08-05 17:16:42 +03:00
ZehMatt 78cff6e293 Implement getter for "guest" and "staff" types in getAllEntities 2021-08-05 17:16:42 +03:00
Ted John 5f853df1fd Remove gS6Info 2021-08-02 20:38:02 +02:00
Gymnasiast 277317b6f1 Bump network and plug-in API version 2021-08-01 15:15:33 +02:00
Ted John 70d9c1438e Change most things and formatting to money64 2021-08-01 15:14:42 +02:00
andrewpratt64andTulio Leao 62d66ca9d0 Add hook for vehicle crashes to plugin api (#15084)
* Add initial implementation of "vehicle.crash" hook for the scripting api

The hook will fire whenever a vehicle crashes, i.e. an individual car
explodes and it's status becomes "Crashed!"

* Update contributors.md

Add name to contributors list under the "Additional implementation (OpenRCT2)" section.

- If the added line needs to be changed or removed entirely let me know

- I added this based off of the Github wiki: "If it's the first time you're contributing with the project, make sure to update the contributors.md file by appending your name at the end of the respective list."

* Move hook code into function

* Rename hook function

Renamed function, "FireVehicleCrashHook" to "InvokeVehicleCrashHook"

* Wrap InvokeVehicleCrashHook in #ifdef

Move the #ifdef from inside the function body to the outside

* Update changelog and api version

- Added entry to changelog
- Increment API version

* Fix whitespace

Replace tab character with four spaces

* Update src/openrct2/scripting/HookEngine.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2021-07-30 09:03:15 -03:00
ZehMatt d9f9e7542a Use EnumMap for HookEngine lookups 2021-07-29 17:07:49 +03:00
ZehMatt f44687b6b2 Use EnumMap for lookup tables in scripting 2021-07-29 17:07:48 +03:00
ζeh Matt 54d70ec52d Fix undefined behavior returning nullptr on std::string (#14952) 2021-06-26 01:29:46 -03:00
Jamie Quigley 4f6d0a00fd Refactor RIDE_STATUS to use strong enum (#14840)
* Refactor RIDE_STATUS to use strong enum

* Change platform-specific code to match RIDE_STATUS refactor

* Re-added check for valid RideStatus value

* Fixed errors in "g2" build target

* Use EnumValue instead of static_cast<uint8_t>

* Revert rct{1,2}.h to use uint8_t.

* Fix formatting

* Reverted from constexpr variable to additional enum variant

* Fix formatting
2021-06-10 07:09:58 +01:00
Duncan 12c5484f44 Refactor SmallSceneryEntry (#14815) 2021-06-03 22:14:41 -03:00
Duncan 7253b92cfd Use correct function call for WallPlaceAction plugin visitor (#14806)
* Use correct function call for WallPlaceAction plugin visitor

* Increment plugin version

* Update changelog
2021-06-02 21:30:49 +01:00
Michael Steenbeek 31848b195e Close #14765: Rename gCheatsFastLiftHill 2021-05-29 18:41:16 +02:00
Duncan 39fcc5d078 Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Silent 94da3cf422 Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
Ryan d309a7c871 Add climate information to Park API (#14636) 2021-05-16 21:06:36 -03:00
ZxBiohazardZxandduncanspumpkin 36b2742c19 Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Ryan 8a282fa31c Add more properties to Park API (#14620)
* Add more properties to Park API

* Add new feature to changelog
2021-05-11 12:46:15 +01:00
Ryan eb9ed63b0e Fix some actions for plugins (#14607)
* Fix some actions for plugins

If an action doesn't have an AcceptParameters method, the paramaters passed in executeAction will be ignored and the action will fail.

* Change plugin parameter names

* Increment plugin API version
2021-05-09 22:04:03 +01:00
Basssiiie 6c65105261 Add getter for current plugin api version (#14538) 2021-04-27 21:08:56 -03:00
Hielke Morsink 7525f5d5da Fix #14493: isHidden broken for elements with baseheight > 32 (#14499) 2021-04-19 19:44:11 +02:00
Duncan b65f12f1cf Use correct null value (#14421)
* Use correct null value

* Increment network version
2021-04-02 13:13:33 +01:00
Duncan 177b5e1b08 Add plugin hook for guest generation (#14107)
* Add plugin hook for guest generation

* Update api version and add ts entry
2021-03-26 05:49:24 +00:00
Duncan 0a47d2157a Use more specific types where appropriate (#14388)
It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
2021-03-25 08:44:25 +00:00