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

193 Commits

Author SHA1 Message Date
Adam
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
Nick
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
Duncan
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
Ted John
173a42f656 Apply code review suggestions 2020-09-03 22:38:42 +01:00
Ted John
1c91404707 Add more network guards 2020-09-03 22:38:42 +01:00
Ted John
dce547af99 Start implementing TCP API 2020-09-03 22:38:35 +01:00
Nils Caspar
bc33ef3d43 Add Park.entranceFee to the plugin API (#12840) 2020-09-03 17:07:19 -03:00
Cory Sanin
8d366ebaea Add Ride.totalProfit to the plugin API (#12795)
Add Ride.totalProfit to the plugin API
2020-08-28 22:52:54 +01:00
Ted John
c5b2b2017a Add vehicle API for plugins 2020-06-11 17:54:36 +01:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Ted John
819208f3cb Add more ride fields to plugin API 2020-05-23 15:28:03 +01:00
Michael Steenbeek
7e7b15812d Merge pull request #11747 from IntelOrca/plugin/small-additions
[Plugin] Add language and split peep into guest and staff
2020-05-20 10:24:24 +02:00
Ted John
03b1974912 Add plugin API for editing park messages (#11755) 2020-05-18 22:59:35 -03:00
Ted John
b710e417df Split peep into guest and staff and add more fields 2020-05-14 18:35:21 +01:00
Ted John
7c0da8a32d Add peep flags and destination 2020-05-14 18:34:25 +01:00
Ted John
e182791a6b Merge pull request #11685 from IntelOrca/plugin/listview-widget
[Plugin] Implement the list view widget
2020-05-10 22:36:44 +01:00
Ted John
5288caec02 [Plugin] Add support for SetCheatAction and cheat retrieval (#11700)
* Add cheats interface API

* Add plugin support for SetCheatAction

* Remove ctx from ScCheats
2020-05-10 13:02:10 -03:00
Ted John
5e427413a6 Refactor list view so we can access it from ScWidget 2020-05-09 17:24:15 +01:00
Tulio Leao
16c5960e99 Merge pull request #11635 from IntelOrca/plugin/ride-game-actions
[Plugin] Add named parameters for ride related game actions
2020-05-09 10:46:41 -03:00
Ted John
59ab39178f Add most fields from RideObject struct 2020-05-08 15:28:48 +01:00
Ted John
ec7b52d555 Add action and args to GameActionResult 2020-05-05 18:00:56 +01:00
Ted John
6c8d199831 Add parameter visitors to ride related actions 2020-05-05 18:00:56 +01:00
Ted John
e3016cdc03 Fix plugin game action hook player and result (#11587)
- Player was not being attached to the game action event args.
- OpenRCT2 was looking for error on the event args object rather than the result sub object.
2020-05-02 11:45:05 +01:00
Ted John
65a9c7a1b1 Implement expenditureType on GameActionResult plugin API (#11514)
* Implement expenditureType on GameActionResult plugin API

* Update src/openrct2/scripting/ScriptEngine.cpp

Co-Authored-By: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Improve formatting of ExpenditureTypes

* Apply code review comments

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-05-01 17:50:11 +01:00
Ted John
bbe7ff0d80 Refactor game action binding for plugins (#11528)
* Refactor game action binding for plugins

Adds parameter visiting for game actions to reduce code needed for binding game actions to JavaScript objects

* Apply suggestions from code review

Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-30 06:56:57 -03:00
Ted John
06bbf5ddda Implement SmallSceneryObject for getObject plugin API (#11489) 2020-04-27 18:41:49 +02:00
Ted John
c67962577a Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING 2020-04-26 14:35:08 +01:00
Ted John
4ebd8da630 Revert change to RemoveCustomGameActions 2020-04-26 14:35:08 +01:00
Ted John
ad75cb0754 Update src/openrct2/scripting/ScriptEngine.cpp
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
2f525e0539 Apply more code review comments 2020-04-26 14:35:07 +01:00
Ted John
ea632a8eed Rename thing to entity 2020-04-26 14:35:07 +01:00
Ted John
b7b1920a79 Fix build 2020-04-26 14:35:06 +01:00
Ted John
76ebef10e3 Add APIs for getting info about loaded objects 2020-04-26 14:35:06 +01:00
Ted John
ea8890aaaa Improve shared storage read / write 2020-04-26 14:35:06 +01:00
Ted John
0c71886941 Implement shared storage 2020-04-26 14:35:06 +01:00