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
Ted John
a16cacff3a
Add special properties for ride action
2020-04-26 14:35:05 +01:00
Ted John
efcf9fd22a
Implement hooking game actions
2020-04-26 14:35:05 +01:00
Ted John
49b155d178
Fix Linux build
2020-04-26 14:35:05 +01:00
Ted John
83fe0cf5c5
Implement strings for GameAction errors
2020-04-26 14:35:05 +01:00
Ted John
2ad37db817
Implement registering game actions
2020-04-26 14:35:05 +01:00
Ted John
4e4379e6ef
Start work on custom game actions
2020-04-26 14:35:05 +01:00
Ted John
f8394953aa
Get thing inhertiance working
2020-04-26 14:35:05 +01:00
Ted John
4d5e7f19ca
Implement surface style API and improve plugin calling
2020-04-26 14:35:04 +01:00
Ted John
00293d20e8
Fix compile
2020-04-26 14:35:04 +01:00
Ted John
e6ca727b4b
Improve dumping of expressions
2020-04-26 14:35:04 +01:00
Ted John
dfd45651dc
Improve stringify of expressions
2020-04-26 14:35:04 +01:00
Ted John
177c1a16a7
Always allow game state to be mutated in single player
2020-04-26 14:35:03 +01:00
Ted John
2890faee0a
Change plugin type to just local and remote
2020-04-26 14:35:03 +01:00
Ted John
bac91cd563
Allow scripting to be compile-disabled
2020-04-26 14:35:03 +01:00
Ted John
a5c8ff920f
Add game mutable protection
2020-04-26 14:35:03 +01:00
Ted John
dc64d3541d
Transfer server-client scripts over network
2020-04-26 14:35:03 +01:00
Ted John
d8b0b24c43
Implement date API
2020-04-26 14:35:02 +01:00
Ted John
d7d880dc23
Restart plugins when starting new game from a game
2020-04-26 14:35:02 +01:00
Ted John
560be19cdf
Implement Ride and RideObject API
2020-04-26 14:35:02 +01:00
Ted John
4b95a3a9d0
Implement custom menu items
2020-04-26 14:35:01 +01:00
Ted John
0e8c627324
Add config option for hot reload and refactor
2020-04-26 14:35:01 +01:00
Ted John
e6915e8799
Do not load plugins on title screen
2020-04-26 14:35:01 +01:00
Ted John
2e62078c30
Exclude node_modules directory
2020-04-26 14:35:01 +01:00
Ted John
082eaf7c9c
Add more network API
2020-04-26 14:35:00 +01:00
Ted John
5d78a1f2bf
Add initial network API
2020-04-26 14:35:00 +01:00
Ted John
5bd58118b5
Get the plugin branch building again
2020-04-26 14:35:00 +01:00
Hielke Morsink
e8bdb95f13
format new files
...
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Ted John
24eafb0a86
Do not crash if plugins directory is missing
2020-04-26 14:35:00 +01:00
Ted John
5ba96a34ac
Fix FileWatcher for Windows
2020-04-26 14:35:00 +01:00
Ted John
1fd33dd86a
Use new FileWatcher class
2020-04-26 14:35:00 +01:00
Ted John
b47bcabaf1
Move ui scripting API to libopenrct2ui
2020-04-26 14:34:59 +01:00
Ted John
237e0be7ef
Add basic window API
2020-04-26 14:34:59 +01:00
Ted John
c340c2abec
Fix segfault on exit
...
By ensuring duk_context is disposed last in ScriptEngine
2020-04-26 14:34:59 +01:00
Ted John
d445cfc125
Refactor plugin scope
2020-04-26 14:34:59 +01:00
Ted John
f54b3efe9e
Use shared_ptr for Plugin
2020-04-26 14:34:59 +01:00
Ted John
a6bb9a9b64
Add tile element support
2020-04-26 14:34:59 +01:00