Commit Graph
195 Commits
Author SHA1 Message Date
Michael Steenbeek 4c046024a3 Merge pull request #16640 from ZehMatt/refactor/entityid-16469
#16469: Introduce EntityId and refactor everything
2022-02-18 21:29:23 +01:00
Ted John 007a33404e Close plugin's windows gracefully when stopped
When a plugin is stopped, close all windows created by that plugin.
Ensure the close event on the window can not open a new window if the plugin is being stopped.
2022-02-17 20:18:30 +00:00
Ted John 105009f3f8 Fix #16591: Plugins: setInterval and setTimeout is not disposed... 2022-02-17 20:18:16 +00:00
ζeh Matt d7f5003943 Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 83c347218b Allow plugins to call change map size game action 2022-02-14 23:15:59 +00:00
ζeh Matt 4554d6d883 Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt a2470c0573 Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
Michael Steenbeek a6042b8903 Merge pull request #16153 from IntelOrca/embed-duktape
Resolve #14259: Embed our own duktape library
2022-01-23 13:45:42 +01:00
Ted John b5d66e099e Embed our own duktape library
Duktape is geared around compile time switches. We can't rely on shared libraries.
2022-01-18 18:29:27 +00:00
ζeh MattandTed John 993b168bfd Implement profiler (#16194)
* Implement profiling API

* Add console commands for the profiler

* Remove accidental line

* Correct csv output

* Add copyright notice

* Add missing override

* Add default virtual destructor

* Explicitly pass template argument

* Use static

* Add plugin API for profiler

* Add more profile calls

* Workaround for GCC hopefully

* Add missing static keyword

* Use uint64 for call count

* Reduce name length see if CI passes

* Improve handling of function names

* Work around (broken) static inline variables

* Fix missing include

* Disable profiler for clang 5 and older

* Update copyright date

* Profile UpdateAllMiscEntities

* Apply review suggestions

Co-authored-by: Ted John <ted@brambles.org>
2022-01-18 20:21:20 +02:00
ζeh Matt 94e20ba7fe Rename some Update functions to Tick 2021-12-13 19:04:48 +02:00
ζeh Matt 83b911b193 #15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
Bas 8682a8677e Fix unable to read litter information in plugin api 2021-10-16 15:38:52 +02:00
ζeh Matt 8effeb26b0 Refactor action result passing for StaffHireNewAction 2021-10-04 17:01:27 +03:00
ζeh Matt 2597c04eb4 Refactor RideCreateAction result data passing 2021-10-02 00:50:03 +03:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt 516232e0a7 Change static casts to EnumValue 2021-09-10 19:10:15 +03:00
ZehMatt 3ad72baaae Cast fixes 2021-09-10 19:10:12 +03:00
Michael Steenbeek 624a32e93b Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
Hielke Morsink e0751d707f Fix #15298: Crash on map.getAllEntities from in-game console (#15301) 2021-08-28 17:43:11 +02:00
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