Commit Graph

7706 Commits

Author SHA1 Message Date
ZehMatt a7bef5442b
Allow plugins to target a specific API version 2021-08-05 17:16:42 +03:00
ZehMatt af102e391e
Return correct entity type, API breaking change 2021-08-05 17:16:42 +03:00
ZehMatt 8f23670df8
Bump up scripting version 2021-08-05 17:16:42 +03:00
ZehMatt 78cff6e293
Implement getter for "guest" and "staff" types in getAllEntities 2021-08-05 17:16:42 +03:00
ocalhoun6 8a09406b64
Fix #13465: Creating a scenario based on a won save game results in a scenario that’s instantly won 2021-08-04 13:31:53 +02:00
Michael Steenbeek 3c86d56933
Merge pull request #15129 from ZehMatt/refactor/clang-tidy-01
Minor cleanup
2021-08-02 22:04:08 +02:00
Michael Steenbeek 8ecbabf8bf
Fix #14974: too many dodgems not handled correctly
Properly check if all vehicles have been created, and clean them up properly if not.
2021-08-02 22:02:06 +02:00
Gymnasiast 5ec2a2e471
Export gS6Info in S6Exporter 2021-08-02 20:38:02 +02:00
Ted John 5f853df1fd
Remove gS6Info 2021-08-02 20:38:02 +02:00
Michael Steenbeek 864de57877
Fix #14667: Unpurchaseable land tiles in Extreme Hawaiian Island 2021-08-01 17:26:43 +02:00
Ted John 417c0f584f
Handle > 255 rides in ride list window 2021-08-01 15:18:15 +02:00
Gymnasiast 277317b6f1
Bump network and plug-in API version 2021-08-01 15:15:33 +02:00
Michael Steenbeek abc4a02ff5
Fix missed ToMoney64() occurrence 2021-08-01 15:14:43 +02:00
Gymnasiast 114eff46f0
Remove static attribute from ToMoney64/32/16 2021-08-01 15:14:43 +02:00
Gymnasiast efb3f8394b
Convert to/from money64 during export; convert completed company value 2021-08-01 15:14:43 +02:00
Gymnasiast 584645a2d2
Fix 'Type too large' error 2021-08-01 15:14:43 +02:00
Gymnasiast 2b78ee7b26
Create other variants of ToMoney# 2021-08-01 15:14:43 +02:00
Gymnasiast 676ef7205e
Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Gymnasiast c97e8d36f1
Fix money effect 2021-08-01 15:14:43 +02:00
Gymnasiast c06d37021b
Change gClearSceneryCost to money64 2021-08-01 15:14:43 +02:00
Gymnasiast 7f4927ced6
More money64 fixes 2021-08-01 15:14:42 +02:00
Gymnasiast f3337de260
Fix weekly profit import 2021-08-01 15:14:42 +02:00
Gymnasiast 8af70cf402
Correctly import ride profits 2021-08-01 15:14:42 +02:00
Ted John 70d9c1438e
Change most things and formatting to money64 2021-08-01 15:14:42 +02:00
Kane bd8d3934e0
Close #15143: Add a shortcut key for Giant Screenshot 2021-08-01 09:20:34 +02:00
ζeh Matt 6b94e81622
Fix dereferencing memory from a temporary object (#15137) 2021-07-31 15:34:40 +01:00
Duncan 69f0020a62
Fix #8601: Revert fix to TT’s base blocks, for support blocker usage 2021-07-31 14:10:00 +02:00
Basssiiie 15423acf4a
Move ToonTowner mine roofs to mine theme instead of pirate theme 2021-07-31 11:00:41 +02:00
Duncan 465d1c5414
Cleanup of Banner related actions (#15126)
* Close #15107. Use correct type and provide appropriate error messages

* Add further error messages to actions

* Apply review comments
2021-07-30 20:53:13 +01:00
ZehMatt fbc689818e
Default initialize ErrorMessageArgs in GameAction Result 2021-07-30 21:31:10 +03:00
ZehMatt aeb68008fa
Fix uninitialized variable in Http.h 2021-07-30 21:31:10 +03:00
ZehMatt ee129db4e0
Move static initialization out and fix bounds check 2021-07-30 21:31:10 +03:00
ζeh Matt 07bfe11847
Merge pull request #15124 from ZehMatt/fuzzer-fixes
Small network fixes
2021-07-30 11:26:58 -07:00
ζeh Matt 43b7c3a204
Fix potential nullptr dereference (#15134) 2021-07-30 14:33:48 -03:00
andrewpratt64 62d66ca9d0
Add hook for vehicle crashes to plugin api (#15084)
* Add initial implementation of "vehicle.crash" hook for the scripting api

The hook will fire whenever a vehicle crashes, i.e. an individual car
explodes and it's status becomes "Crashed!"

* Update contributors.md

Add name to contributors list under the "Additional implementation (OpenRCT2)" section.

- If the added line needs to be changed or removed entirely let me know

- I added this based off of the Github wiki: "If it's the first time you're contributing with the project, make sure to update the contributors.md file by appending your name at the end of the respective list."

* Move hook code into function

* Rename hook function

Renamed function, "FireVehicleCrashHook" to "InvokeVehicleCrashHook"

* Wrap InvokeVehicleCrashHook in #ifdef

Move the #ifdef from inside the function body to the outside

* Update changelog and api version

- Added entry to changelog
- Increment API version

* Fix whitespace

Replace tab character with four spaces

* Update src/openrct2/scripting/HookEngine.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2021-07-30 09:03:15 -03:00
ZehMatt dd2ffec14b
Code review changes 2021-07-29 20:08:57 +03:00
ZehMatt 4f54aa5c42
Limit the count of packets processed per update 2021-07-29 20:06:38 +03:00
ZehMatt 6877b8214a
Fix unhandled exceptions during packet processing 2021-07-29 20:06:36 +03:00
ZehMatt d9f9e7542a
Use EnumMap for HookEngine lookups 2021-07-29 17:07:49 +03:00
ZehMatt e520e4f991
Use EnumMap for RideObject lookup tables 2021-07-29 17:07:48 +03:00
ZehMatt e991c128dc
Use EnumMap for format token lookups 2021-07-29 17:07:48 +03:00
ZehMatt 3fbfa26dd3
Use EnumMap for Cursors string lookup 2021-07-29 17:07:48 +03:00
ZehMatt f44687b6b2
Use EnumMap for lookup tables in scripting 2021-07-29 17:07:48 +03:00
ZehMatt ce8040b858
Use EnumMap for string to colour conversion 2021-07-29 17:07:48 +03:00
ZehMatt a36e0a32f7
Add EnumMap container for bidirectional key, enum mapping 2021-07-29 17:07:48 +03:00
Michael Steenbeek 71ff9bf6d6
Allow loading images from .pob files (#15122) 2021-07-28 21:25:51 +02:00
ζeh Matt 87007ba2a3
Change track paint signature to pass ride instead of ride index 2021-07-28 18:21:59 +02:00
Gymnasiast 6f9468a316
Implement invisible platforms on some tracked rides 2021-07-28 11:23:09 +02:00
Gymnasiast 5486dd3fa4
Hide wooden platforms when the “no platforms” station style is selected 2021-07-28 11:22:55 +02:00
Gymnasiast bb682ca09d
Hide brown base on flat rides if "no platform" station style is selected 2021-07-28 11:22:44 +02:00
Michael Steenbeek ab18612882
Remove Music Acknowledgements window (#15116)
It was of limited use to us anyway since we didn’t license the music ourselves, but now the actual track names and composers are shown in the Object Selection, the window lost its last bit of usefulness.
2021-07-28 10:26:35 +02:00
Michael Steenbeek f3aac0bb96
Merge pull request #15113 from ZehMatt/fix-nsf-pathfinding
Fix path finding for larger maps
2021-07-28 09:21:52 +02:00
Michael Steenbeek 0b6e80c7d4
Add error message body to failed Place Park Entrance action 2021-07-27 23:50:16 +02:00
ZehMatt b7b3418b75
Fix setNull on inherited classes leaving uninitialized variables 2021-07-27 21:34:53 +03:00
ZehMatt 163fe3756d
Fix GameStateSnapshots buffer overrun 2021-07-27 21:10:06 +03:00
Duncan d76611e0f2
Actually allocate a banner when using GetOrCreateBanner
When importing a file this function is used to create a banner at a certain index. Previously this was not assigning the id to the banner id. Luckily as banner id is a new field this did not cause any issues except in the nsf which does use the banner id more extensively
2021-07-27 19:58:09 +02:00
ZehMatt ac08049472
Adapt SV6 import and export for peep path-finding data 2021-07-27 20:40:19 +03:00
ZehMatt bb6b931a7d
Use TileCoordsXYZ in path finding for bigger map support 2021-07-27 20:39:39 +03:00
ZehMatt 0e7d05a5ad
Add TileCoordsXYZD serialiser traits 2021-07-27 20:15:10 +03:00
ZehMatt b9ec5d079e
Add construction of TileCoordsXYZD with TileCoordsXYZ 2021-07-27 19:57:45 +03:00
Michael Steenbeek 7b7744057e
Merge pull request #15101 from ZehMatt/crashdumps
Dump crash dumps into a different directory and include version in reports
2021-07-27 18:02:47 +02:00
ZehMatt 47287e7fb1
Save crash dumps into a separate directory 2021-07-27 18:39:13 +03:00
ζeh Matt afc4cd7cba
Refactor ride construction code into a new unit 2021-07-27 17:21:03 +02:00
ζeh Matt 13aee659f0
Fix #15096: Crash placing entrance near corner in scenario editor 2021-07-27 12:02:34 +02:00
Duncan e9eb1b8304
Banner Refactor from NSF (#14788)
* Banner refactor

* Fix mistake in fix_duplicated_banners

* Reduce limit back

* Fix export

* Free banner on delete

* Increment network version

* Fix potential banner pointer crashes

Co-authored-by: Ted John <ted@brambles.org>
2021-07-27 10:25:58 +01:00
Michael Steenbeek 6405d0246c
Fix #14612: Crash in research_insert_ride_entry() 2021-07-26 22:23:03 +02:00
Michael Steenbeek ba6407f649
Fix #5465: improper types in Objective::CheckGuestsBy() 2021-07-26 21:23:41 +02:00
Michael Steenbeek d880fbda56
Use constant for RCT1 max map size 2021-07-26 21:17:33 +02:00
Michael Steenbeek 4f80ef50ef
Fix #15086: Crash in vehicle_create_trains() 2021-07-26 21:17:17 +02:00
ZehMatt dab33b3347
Add version to the crash dump info 2021-07-26 00:39:39 +03:00
duncanspumpkin 5087e77032 Release v0.3.4.1
- Fix: [#15028] Crash when placing large scenery.
- Fix: [#15048] Crash when removing litter with cheats.
- Fix: [#15052] Crash when using banner window.
- Fix: [#15063] Crash when opening large scenery signs.
- Improved: [#12626] Allow using RCT2 saves to mark RCT Classic (.sea) parks as finished and vice versa.
2021-07-25 20:16:08 +01:00
duncanspumpkin e8e7bdb776 Update Backtrace.io token for v0.3.4.1 2021-07-25 20:04:58 +01:00
Hielke Morsink c887a049d2
Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
ZehMatt e4758df2e9
Fix #15048: Crash removing litter from cheats 2021-07-22 22:14:12 +03:00
Duncan bbef85e752
Fix #15028, #15042. Crash when placing large scenery (#15043)
* Fix #15028, #15042. Crash when placing large scenery

When the fragmented tile element limit is reached whilst placing a large scenery ghost the game will perform a reorg of the map elements invalidating tile element pointers. As large scenery are multi tiled this can happen mid action invalidating the pointer that was allocated for the first tile element. Large scenery actions pass back the first tile element pointer to the calling function for use with ghost removal. When this pointer is invalid it causes the crash. The ultimate fix for this would be to create an undo function for actions. As an interim the function has been modified to return the first tile height.

* Update changelog
2021-07-21 13:01:09 +01:00
Gymnasiast 2a175e7678
Split off mini golf acceleration calculation 2021-07-20 15:01:18 +02:00
Gymnasiast 1965aaca73
Replace loc_6DBA33 with a loop 2021-07-20 14:48:18 +02:00
Gymnasiast 3966c6f7a4
Cleanup gotos to loc_6D8E36 2021-07-20 14:43:29 +02:00
Gymnasiast d0436c7379
Rename unkF64E35 to stationBrakesWork 2021-07-20 14:35:01 +02:00
Michael Steenbeek 2a9481bb99
Add Πligature 2021-07-20 14:28:43 +02:00
Michael Steenbeek 3bb15d9067
Support drawing em-dashes
These are used in the French translation.
2021-07-20 13:34:22 +02:00
Michael Steenbeek 6a44b7cc5d
Merge pull request #15024 from Gymnasiast/refactor/remove-gotos
Remove gotos from Map.cpp
2021-07-20 11:18:57 +02:00
Struan Clark aa69593064
Close #12626: Allow completing RCTC scenarios with RCT2 saves 2021-07-19 16:12:03 +02:00
Gymnasiast af0d4a0b63
Integrate loc_68BABC 2021-07-19 15:14:31 +02:00
Gymnasiast f54b008ac3
Spin off MapLoc68BABCShouldContinue() 2021-07-19 15:13:19 +02:00
Gymnasiast 41e564d16c
Integrate loc_68B9B7 2021-07-19 15:01:00 +02:00
Gymnasiast 95fa0e34e0
Integrate loc_68BAE6 2021-07-19 14:57:32 +02:00
Gymnasiast e0daac9442
Release v0.3.4
- Feature: [#13967] Track List window now displays the path to the design when debugging tools are on.
- Feature: [#14071] “Vandals stopped” statistic for security guards.
- Feature: [#14169] Lighting effects for shops and stalls.
- Feature: [#14296] Allow using early scenario completion in multiplayer.
- Feature: [#14538] [Plugin] Add property for getting current plugin api version.
- Feature: [#14620] [Plugin] Add properties related to guest generation.
- Feature: [#14636] [Plugin] Add properties related to climate and weather.
- Feature: [#14731] Opaque water (like in RCT1).
- Change: [#14496] [Plugin] Rename Object to LoadedObject to fix conflicts with Typescript's Object interface.
- Change: [#14536] [Plugin] Rename ListView to ListViewWidget to make it consistent with names of other widgets.
- Change: [#14751] “No construction above tree height” limitation now allows placing high trees.
- Change: [#14841] Redesign the About window, including new button to copy the current version info.
- Fix: [#11829] Visual glitches and crashes when using RCT1 assets from mismatched or corrupt CSG1.DAT and CSG1i.DAT files.
- Fix: [#12262] Windows can appear off screen with small screens or high scaling.
- Fix: [#13581] Opening the Options menu causes a noticeable drop in FPS.
- Fix: [#13894] Block brakes do not animate.
- Fix: [#13986] OpenGL: Track preview window, flip/rotate button do not update the thumbnail.
- Fix: [#14315] Crash when trying to rename Air Powered Vertical Coaster in Korean.
- Fix: [#14330] join_server uses default_port from config.
- Fix: [#14415] Entrances/exits are removed when built on top of each other.
- Fix: [#14449] Surface smoothing at extra zoom levels not working.
- Fix: [#14468] Cannot close Options window on Android.
- Fix: [#14493] [Plugin] isHidden only works for tile elements up to the first element with a base height of over 32.
- Fix: [#14587] Confusing message when joining server with mismatched network version.
- Fix: [#14604] American-style Steam Trains are not imported correctly from RCT1 saves.
- Fix: [#14638] The “About OpenRCT2” window cannot be themed.
- Fix: [#14682] Crash when painting Swinging Ships with invalid subtype.
- Fix: [#14707] Crash when window is closed during text input.
- Fix: [#14710] Ride/Track Design preview does not show if it costs more money than available.
- Fix: [#14774] Incorrect import of scenery research caused all scenery to be unlocked.
- Fix: [#14806] Incorrect function call in WallPlaceAction plugin code.
- Fix: [#14871] Crash when trying to place track when there are no free tile elements.
- Fix: [#14880] Unable to close changelog window when its content fails to load.
- Fix: [#14945] Incorrect drop height penalty on log flume ride.
- Fix: [#14964] Unable to build in multiplayer as client with "Build while paused" cheat enabled when the host is paused.
- Improved: [#14511] “Unlock operating limits” cheat now also unlocks all music.
- Improved: [#14712, #14716] Improve startup times.
- Improved: [#14982] Add Malgun Gothic and change Nanum Gothic filename for Korean.
2021-07-19 12:54:49 +02:00
Gymnasiast 5584c96d33
Update Backtrace.io token for v0.3.4 2021-07-19 12:50:08 +02:00
duncanspumpkin 6116b490eb
Revert place park entrance change
Incorrectly changed. ParkEntrances can go nearer to the edge.
2021-07-19 12:17:23 +02:00
duncanspumpkin ae6657dcdc
Close #14903. Use map_is_edge 2021-07-19 12:17:22 +02:00
TELK 82e72afde5 Change y_offset and hintings of Nanum Gothic TTF Font for Korean 2021-07-03 15:32:41 +09:00
TELK a642b53088 Add Malgun Gothic as a TTF font alternative for Korean 2021-07-03 15:21:54 +09:00
ζeh Matt 6863da569f
Refactor ride rating to allow multiple updates (#14963)
* Refactor rating calculation to pass the state allowing multiple updates

* Rename RideRatingUpdateData to RideRatingUpdateState
2021-06-30 19:57:27 +01:00
ζeh Matt b2387d06b6
Fix #14964: Building in multiplayer while paused 2021-06-30 20:51:04 +02:00
WantDiscussion 06026ec55e
Improvement: Added lighting effects for shops and stalls. (#14169)
* Improvement: Added lighting effects for shops and stalls.

* Moved offset rotations for lights to declaration.

* - Made function variables Const&, Const

- Fixed casing

- Removed direction variable from kiosk function

- Moved kiosk light offset rotation to declaration

* Ensure defines are only set for given target with cmake

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2021-06-30 07:55:02 +01:00
Hielke Morsink 617bb698ae
Use UK spelling of center 2021-06-29 00:03:45 +02:00
duncanspumpkin b68b516842 Update network version 2021-06-27 08:33:40 +01:00
duncanspumpkin 5754af8696 Fix #14945. Incorrect drop height penalty on log flume ride 2021-06-27 08:33:11 +01:00
Hielke Morsink bd18bce3a7
Reflect actual string in string identifier (#14958) 2021-06-26 10:00:05 -03:00