Commit Graph

14211 Commits

Author SHA1 Message Date
Hielke Morsink c064614280 Use new copyright/license notice 2020-04-26 14:35:00 +01:00
Hielke Morsink d6b4064794 Use variant argument type for console.log 2020-04-26 14:35:00 +01:00
Hielke Morsink 34b5aab6c0 Add new tile element classes for each type
This introduces some template code  to get around the problem of properties not being available for child-elements. I've tried to make clear what it's for by adding a comment.

So far only the Track element has an extra property (rideIndex), but it's fairly easy to add new ones.
2020-04-26 14:35:00 +01:00
Hielke Morsink 5befd39063 Construct ScWindow properly 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 26eb91016e Remove old hot reload code 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 834cfad502 Create new FileWatcher class 2020-04-26 14:34:59 +01:00
Ted John 7047dec1d9 Get custom drop downs working
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-04-26 14:34:59 +01:00
Ted John 918022da3e Get custom buttons working 2020-04-26 14:34:59 +01:00
Ted John 291143c3cd Add opening of a custom window 2020-04-26 14:34:59 +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
Ted John 5697bcf0bd Add basic map and thing support 2020-04-26 14:34:59 +01:00
Ted John 4a575975f6 Add hook system 2020-04-26 14:34:59 +01:00
Ted John 3556dead74 Add hot reloading support 2020-04-26 14:34:59 +01:00
Ted John de527b3ff7 Add load and start plugin scripts 2020-04-26 14:34:59 +01:00
Ted John 1acf1e870a Add park API 2020-04-26 14:34:59 +01:00
Ted John 839dd6842b Add console API using dukglue 2020-04-26 14:34:59 +01:00
Ted John f0de6533a0 Add dukglue 2020-04-26 14:34:58 +01:00
Ted John 43508e0402 Add script engine and connect to std console 2020-04-26 14:34:58 +01:00
Ted John a1ebcdea5c Add duktape library 2020-04-26 14:34:58 +01:00
Fred-1044276 a3e7f0958c
Allow Air Powered Vertical Coaster without complete circuit
This changes the Air Powered Vertical Coaster so that it can be tested and opened without the need for a complete circuit (mirroring RCT1 and RCT3 behaviour). There appears to be no technical reason for RCT2's requirement for having a complete circuit.
2020-04-26 11:25:08 +02:00
Breno Guimaraes 2019fa4655 Replay set_format_arg calls in favor of using Formatter 2020-04-25 19:35:49 -03:00
Breno Rodrigues Guimarães a0619d04cf
Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Breno Guimaraes 38ffc4f577 Use a pointer instead of reference as a member.
This allows the assignment operator for the iterator to be generated
automatically by the compiler.
2020-04-25 17:51:26 -03:00
Michael Steenbeek 0ecc64f781
Fix #11407: Setting an RCT1 path needs better error messages (#11418) 2020-04-25 15:36:44 +02:00
Michael Steenbeek b417da7905
Fix drawing of walls with incorrect scrolling modes (#11453) 2020-04-25 10:19:13 +01:00
Kevin Strehl 5456899afc
Close #10572: Add cheat to allow building at invalid heights 2020-04-25 01:07:36 +02:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Michael Stowe f281aa1a80
Fix #8571: Redundant comparison in Station.cpp 2020-04-25 00:08:04 +02:00
Tom Lankhorst da0c586fad
Mark getters in audio layer as [[nodiscard]] 2020-04-24 18:38:11 +02:00
WantDiscussion 37e9270c00
Close #6024: Closing object selection now advances to next step
In the scenario editor and track designer X button in object selector
will now close the object selector window and advance to the next stage
instead of closing the scenario editor and track editor entirely and
returning to the main menu.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-04-24 17:19:06 +02:00
Michał Janiszewski 295a98028e
Disable warnings around incompatible function pointer cast (#9543)
This addresses a compilation issue with newer (8+) mingw.

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2020-04-24 16:03:03 +02:00
FlukiestEmperor 23d295924d
Fix Android filesystem compilation error when using NDK revision 19+
When attemping to build with ndk 19+ I get the following error: error: undefined reference to 'std::__ndk1::__fs::filesystem::path::__extension() const'

Looking at this issue here https://github.com/android/ndk/issues/609 and https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md#package-management it's stated that the ndk does not support std::filesystem.
2020-04-24 13:08:44 +02:00
FlukiestEmperor 944e61d446 Add missing nullable annotations 2020-04-23 22:23:51 -05:00
FlukiestEmperor 512d77e011 Remove unreachable code
Since the compile sdk is 19, the if check is always true since it's checking 19 >= 17. This also removes the need for the success boolean which would always be true.
2020-04-23 22:21:28 -05:00
Michael Steenbeek 44f62a97c2
Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +02:00
Michael Steenbeek 144d312ead
Fix RCT1 import importing too many vehicle types (#11419) 2020-04-24 04:00:41 +02:00
Michael Steenbeek f5e2efac77
Close #11390: Write OpenRCT2 build hash to screenshot metadata (#11423) 2020-04-24 04:00:17 +02:00
ifimfree aaaae16d15
Close #11209: Show a warning when the user is running OpenRCT2 in Wine (#11395) 2020-04-23 19:12:54 +02:00
Michael Steenbeek 62482312fb
Bump network version 2020-04-23 14:44:23 +02:00
Michael Steenbeek d0f2ade778
Fix #11405: Building path through walls does not always remove them (#11416) 2020-04-23 14:35:54 +02:00
Tulio Leao dd64295ba7
Rename and improve documentation on MAX_STR_COUNT (#11409) 2020-04-23 12:29:02 +02:00