1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00
Commit Graph

637 Commits

Author SHA1 Message Date
Harry Hopkinson
70ea832808 Move gCompanyValue to GameState_t 2024-02-27 16:31:38 +01:00
Stephan Spengler
bcff6f5a7e Update ScTileElement.cpp: fix typos (#21463) 2024-02-26 18:10:47 -03:00
Harry Hopkinson
7797db10c8 Replace Macros and Notation in Cheats.h, common.h and Context.h. (#21437) 2024-02-23 19:30:35 -03:00
Martin Mizzi
f5a9846ea2 Move gBankLoan and gBankLoanInterestRate to GameState_t 2024-02-19 04:42:44 -05:00
Alex Parisi
efb6d48c4c Add plugin API to get registered plugin metadata (#20709)
* Added API for getAllPlugins

Added functionality to the Scripting API to allow Contexts to return a list of all registered plugins.

* Fixed naming conventions, returning list of authors

Changed function names to follow get/set convention. Removed unnecessary copies of shared pointers, now using auto instead. Changed the functionality to return an array of authors instead of a string.

* Added changelog entry

Also added myself to list of contributors

* Moved all functionality to ScPlugin

Created a ScPlugin class and moved the current getPlugins functionality there.

* Changed from method to property

Function names now match the get/set convention for properties. Also did some code cleanup.

* Update copyright

* Bump plugin version

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-02-16 05:53:48 -03:00
Harry Hopkinson
691f5f88e5 Move gNewsItems to GameState 2024-02-14 10:54:15 +00:00
Harry Hopkinson
1c285dbf9f Move gMaxBankLoan to GameState 2024-02-13 21:36:35 +01:00
Harry-Hopkinson
b755c873e5 Move gMapSize to GameState_t 2024-02-12 21:32:08 +00:00
Gymnasiast
61e8b6d206 Move _suggestedGuestMaximum to GameState_t 2024-02-08 21:47:31 +01:00
Gymnasiast
142d708cee Move _guestGenerationProbability to GameState_t 2024-02-08 21:46:41 +01:00
Harry Hopkinson
6deac11916 Move gTotalRideValueForMoney to GameState_t 2024-02-08 09:39:28 +00:00
Harry Hopkinson
ad5ef31a97 Move gTotalIncomeFromAdmissions to GameState_t (#21348) 2024-02-07 19:13:04 -03:00
Harry Hopkinson
3eb9cf2264 Move gTotalAdmissions to GameState_t (#21341)
Part of #21193.
2024-02-06 21:42:05 +01:00
Gymnasiast
8208afe5f6 Move gResearch* globals to GameState_t 2024-01-29 21:36:04 +01:00
Harry Hopkinson
11ae8247bd Move gNumGuestsInPark to GameState_t (#21295)
* Move gNumGuestsInPark to GameState_t

* Replace GetGameState() with gameState
2024-01-28 19:17:43 -03:00
Matt
bf4f82da07 Merge pull request #21276 from ZehMatt/fix-21188
Fix using iterators that are deleted by the plugin
2024-01-25 18:46:51 +02:00
ζeh Matt
cc64a17642 Skip intervals that are deleted within callbacks 2024-01-25 17:13:25 +02:00
ζeh Matt
84213efde2 Fix using iterators that are deleted by the plugin 2024-01-25 17:01:00 +02:00
Hielke Morsink
0c10435b7e #21193: Move gParkValue to GameState_t 2024-01-25 14:30:44 +01:00
Michael Steenbeek
115e7389a9 Move most gScenario* globals to GameState_t 2024-01-24 22:17:32 +01:00
Hielke Morsink
422df650b6 #21193: Move gParkSize to GameState_t (#21260) 2024-01-24 14:18:46 +01:00
Hielke Morsink
fb420f6516 #21193: Move gParkEntranceFee to GameState_t (#21256) 2024-01-24 13:45:01 +01:00
Harry Hopkinson
42336915cd Move gClimateCurrent to GameState_t 2024-01-24 11:18:54 +01:00
Hielke Morsink
f85cac627d #21193: Move gParkRating to GameState_t 2024-01-23 00:11:34 +01:00
Michael Steenbeek
b5786c2a86 Move gGuestInitial* to GameState 2024-01-22 22:28:16 +00:00
Hielke Morsink
13351d996e #21193: Move gParkFlags to GameState_t, refactor uses
Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
2024-01-22 16:31:35 +01:00
Harry Hopkinson
0f283dc2a9 Move gClimate to GameState_t 2024-01-21 21:05:22 +00:00
Harry Hopkinson
7ca5b1cd65 Move gClimateNext to GameState_t (#21231) 2024-01-21 18:22:57 +01:00
Matt
b35eb7ac7f Merge pull request #21229 from ZehMatt/21193-gCash
#21193: Move gCash to GameState_t, refactor uses
2024-01-20 17:00:58 +02:00
Katherine Norton
0450435377 Add Plugin API for managing a guest's items (#21062)
* Add API for guest items in openrct2.d.ts

* Create GuestItem interfaces

* Set fields to readonly and add documentation

* Implement getting items array

* Implement checking if a guest has an item

* Implement removing items from guests

* Implement giving a guest an item

* Re-merge GuestItemType with FoodDrinkType

* Add more data validation for the EnumMaps

* Update versioning and changelog

* Add some errors to the give_item method

* Bump network version

* Update VoucherType to if/else

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Add static_assert to ScGuest.hpp

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-01-20 11:51:23 -03:00
ζeh Matt
3518a638bb #21193: Move gCash to GameState_t, refactor uses 2024-01-20 15:46:35 +02:00
ζeh Matt
a5dde0f8dc Replace gCurrentTicks with the one in GameState_t 2024-01-19 16:32:19 +02:00
Gymnasiast
9d03fad8b8 Rename TrackSlope to TrackPitch 2024-01-17 23:34:37 +01:00
Gymnasiast
95c1adc813 Rename TrackBank to TrackRoll 2024-01-17 23:34:36 +01:00
Gymnasiast
cffc55e165 Rename fields of TrackDefinition 2024-01-17 23:33:19 +01:00
Gymnasiast
44d547a4bc Make TrackPitch into an enum class 2024-01-17 23:33:19 +01:00
Gymnasiast
b832eb5f72 Make TrackBank into an enum class 2024-01-17 23:33:19 +01:00
Max
7a9e8a5e44 Fix: setting brake/booster speeds via plug-in does not work 2024-01-15 08:28:21 +01:00
ζeh Matt
7d3c273594 Fix #21171: Crash creating entities with no slots available 2024-01-12 17:56:23 +02:00
ζeh Matt
6eea65fac7 Make the compiler happy 2024-01-11 19:45:07 +02:00
ζeh Matt
88a0e4b8d4 Apply review suggestions, remove redundant comment 2024-01-11 17:34:32 +02:00
ζeh Matt
8bcd409fb0 Fix #21145, #21158: Keep handles for intervals stable and resolve crash 2024-01-06 10:42:17 +02:00
James103
1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
ζeh Matt
62c0bc2cf5 Remove 13k dynamic initializer by changing SpriteGroupNames type 2023-11-25 16:22:45 +02:00
ζeh Matt
0ffbd65576 Bump plugin API version 2023-10-08 02:30:55 +03:00
ζeh Matt
b4376ab590 Add owner property to tile elements for scripting 2023-10-08 02:30:43 +03:00
Andrew
e17bca3b53 Made setting the game speed a game action (#20825)
* Bare minimum for a game action

* Changelog entry

* Fixed formatting

* Consistent capitalization

* Committed wrong file

* Removing redundant toolbar invalidations

* Bump network version; remove redundant qualifier

* Fixed crash on starting server
2023-10-04 16:13:40 +01:00
Stephan Spengler
39ecab4bd2 add small scenery tertiary colour to plugin API (#20818)
* add small scenery tertiary colour to plugin API

* bump API version
2023-10-01 11:27:04 +01:00
duncanspumpkin
a6bed128b5 Bump scripting version 2023-09-26 19:05:02 +01:00
Basssiiie
f2c6dcbbec Fix incorrect target api when executing custom actions (#20778) 2023-09-11 08:05:35 +01:00