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

141 Commits

Author SHA1 Message Date
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 Matt
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
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
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