Commit Graph
125 Commits
Author SHA1 Message Date
ZehMatt 9f95b006d3 Move ScTileElement into its own files 2021-08-11 22:15:37 +03:00
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 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 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 adf5829cd6 Re-arrange structure of scripting 2021-08-11 22:15:34 +03:00
ZehMatt a7bef5442b Allow plugins to target a specific API version 2021-08-05 17:16:42 +03:00
ZehMatt f44687b6b2 Use EnumMap for lookup tables in scripting 2021-07-29 17:07:48 +03: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
Basssiiie 6c65105261 Add getter for current plugin api version (#14538) 2021-04-27 21:08:56 -03: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 df7a284822 Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Felix 9ec30e6869 Increase API version and update changelog 2021-03-06 23:51:02 +01:00
Ted John c7d9eba9db Increment plugin API version 2021-02-24 22:56:29 +00:00
Ted John c2183989a5 Allow spinners to be clicked and held 2021-02-24 22:37:31 +00:00
Ted John 93f17f1175 Add custom widget logic and network stats API 2021-02-24 22:37:31 +00:00
Cory Sanin 57c950958b Feature: Add option for taking transparent screenshots 2021-02-22 22:48:51 +01:00
Ted John f7bbaed7f5 Increment plugin API version 2021-02-18 18:10:29 +00:00
Ted John 3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00:00
Ted John 17450c236e Increment plugin API and update changelog 2021-02-08 22:28:59 +00:00
Ted John c2eb6d4153 Improve plugin API and type definitions 2021-01-28 20:52:17 +00:00
Ted John 4d8faee062 Increment plugin API version 2021-01-27 00:28:59 +00:00
skdltmxn 7ef4d7762f Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
skdltmxn c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Sadret d22c2edee5 Implement #13384: Expose all TileElement data to plugin API 2021-01-03 18:42:21 +01:00
Ted John 6fb7921dbd [Plugin] Add context.setInterval and context.setTimeout 2021-01-03 16:08:35 +01:00
Bas 918bd015b5 Increment plugin version, update changelog 2020-12-29 15:49:26 +01:00
Mike Jones 4e991beb8d Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
Adamandduncanspumpkin f09b14ef2b Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Ted John 687fd6d9f4 Increment plugin API version 2020-12-05 18:32:28 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
67f5ce62b3 Plugins - return result from StaffHireAction (#13459)
* Added some scripting glue to StaffHireNewAction

* Update src/openrct2/scripting/ScriptEngine.cpp

Co-authored-by: Ted John <ted@brambles.org>

* Update plugin api version

Co-authored-by: Ted John <ted@brambles.org>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:37:07 -03:00
DuncanandTulio Leao b5101d085d Add further plugin visitors for actions (#13458)
* Add further plugin visitors for actions

* Update PLUGIN_API_VERSION

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-11-26 16:13:10 -03:00
maksimdrachov 1815a094bb Fix #13426: Typo in "repay loan" 2020-11-19 19:45:40 +01:00
Sadret 4ff412dfe1 Close #13359: Make GameAction flags optional in plugin API. (#13381) 2020-11-06 09:40:15 +00:00
Sadret 2f4b1b9e3f Close #13376: Open custom window at specified tab 2020-11-05 17:43:23 +01:00
Sadret c602db27fd Close #13057: Make GameAction flags accessible by plugins. (#13359) 2020-11-03 15:43:43 +00:00
Sadret c2d309af38 Close #13346: Change FootpathScenery to FootpathAddition (#13350) 2020-11-03 08:17:29 +00:00
ζeh Matt 645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Ted John 146a754001 Add plugin API for scenario and objective 2020-09-13 17:02:12 +01:00
Ted John e5107141e9 Add plugin API for park flags 2020-09-13 15:00:09 +01:00
Gymnasiast c83ddefe47 Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
Duncan 353c02b596 Add visitors for all scenery placement and removes (#12886)
* Add visitors for all scenery placement and removes

This should allow greater flexibility for plugin developers

* Add CoordsXYZ visitor

* Increment plugin API version. Update changelog
2020-09-10 15:15:46 -03:00
Tom Parsons 9a30100a81 Make all GameAction types accessible to plugins (#12708)
* add ActionType

* Make all game actions available to plugins

Includes list of game actions in the .d.ts

* Add an overload for internal game actions

This allows things like Visual Studio Code to autocomplete

* action can be a string (custom gameactions)

* Increment OPENRCT2_PLUGIN_API_VERSION

* Add #12708 to changelog and tombomp to contributors.
2020-09-10 12:30:56 +01:00
Ted John 858bb4045f Explicitly close sockets when plugin is stopped 2020-09-03 22:38:42 +01:00
Ted John 0bddf5a5db Rename SocketServer to Listener 2020-09-03 22:38:42 +01:00