Ted John
be0e4a2869
Implement custom tools
2020-05-02 11:08:43 +01:00
Ted John
0ca52e58fd
Implement tile selection API
2020-05-02 11:08:43 +01:00
Duncan
32eb7071a1
Fix #11550 : Use std::nullopt instead of empty brace ( #11595 )
...
This is technically a gcc bug from the looks of it but since std::nullopt is slightly easier to read I've gone through the codebase and used that over empty braces. In addition noticed a mistake on the scripting viewport get widgetIndex function where it would return an incorrect widgetIndex.
2020-05-02 10:09:12 +02:00
hdpoliveira
d78638c17a
Part of #9473 : Create Vehicle::TrainReadToDepart ( #11593 )
...
Converted from train_ready_to_depart
2020-05-02 00:41:11 -03:00
hdpoliveira
3b099f52d0
Part of #9473 : Create Vehicle::SimulateCrash
...
Converted from vehicle_simulate_crash
2020-05-02 00:00:09 -03:00
hdpoliveira
0fdc6531dc
Part of #9473 : Create Vehicle::CrashOnLand
...
Converted from vehicle_crash_on_land
2020-05-02 00:00:09 -03:00
hdpoliveira
7c291c330e
Part of #9473 : Create Vehicle::CrashOnWater
...
Converted from vehicle_crash_on_water
2020-05-02 00:00:08 -03:00
hdpoliveira
efbdbee3fa
Part of #9473 : Create Vehicle::CloseRestraints
...
Converted from vehicle_close_restraints
2020-05-01 23:29:31 -03:00
hdpoliveira
f129fb55af
Part of #9473 : Create Vehicle::OpenRestraints()
...
Converted from vehicle_open_restraints
2020-05-01 23:29:31 -03:00
hdpoliveira
bfe5366dbe
Part of #9473 : Create Vehicle::UpdateVelocity
...
Converted from update_velocity
2020-05-01 22:04:17 -03:00
hdpoliveira
48045950c1
Part of #9473 : Create Vehicle::CheckAndApplyBlockSectionStopSite
...
Converted from check_and_apply_block_section_stop_site
2020-05-01 22:04:17 -03:00
hdpoliveira
dd8633499a
Part of #9473 : Create Vehicle::UpdateTrackMotionUpStopCheck
...
Converted from vehicle_update_track_motion_up_stop_check
2020-05-01 22:04:17 -03:00
hdpoliveira
55aae04ff5
Part of #9473 : Create Vehicle::Claxon
...
Converted from vehicle_claxon
2020-05-01 22:04:17 -03:00
hdpoliveira
24ec443ff5
Vehicle update 9473 05 ( #11586 )
...
* Part of #9473 : Create Vehicle::CanDepartSynchronised
Converted from vehicle_can_depart_synchronised
* Part of #9473 : Create Vehicle::ReverseReverserCar
Converted from vehicle_reverse_reverser_car
* Part of #9473 : Create Vehicle::UpdateReverserCarBogies
Converted from vehicle_update_reverser_car_bogies
* Part of #9473 : Create Vehicle::UpdateHandleWaterSplash
Converted from vehicle_update_handle_water_splash
2020-05-01 21:50:40 -03:00
hdpoliveira
4649b573f4
Part of #9473 : Create Vehicle::GetGForces
...
Converted from vehicle_get_g_forces
2020-05-01 19:49:03 -03:00
hdpoliveira
acc6b9f878
Part of #9473 : Create Vehicle::SetMapToolbar
...
Converted from vehicle_set_map_toolbar
2020-05-01 19:49:02 -03:00
hdpoliveira
e8c95e6e3a
Part of #9473 : Create Vehicle::IsUsedInPairs
...
Converted from vehicle_is_used_in_pairs
2020-05-01 19:49:01 -03:00
Tulio Leao
21beb2368e
Merge pull request #11579 from hdpoliveira/vehicle_update_9473_03
...
Vehicle update 9473 03
2020-05-01 19:09:45 -03:00
Tulio Leao
b5749ac8f6
Merge pull request #11578 from tupaschoal/more-coordz-1
...
Keep scouring openrct2-ui to reduce individual {x, y} usage
2020-05-01 18:57:38 -03:00
Tulio Leao
76ff67d4c8
Use CoordsXY in windows/RideConstruction.cpp
2020-05-01 18:06:30 -03:00
Tulio Leao
4589560a15
Make sub_6C683D() use CoordsXYZ on parameter and return
2020-05-01 18:06:26 -03:00
hdpoliveira
4d7ad5f92b
Part of #9473 : Create Vehicle::NumPeepsUntilTrainTail
...
Converted from vehicle_get_total_num_peeps
2020-05-01 17:24:55 -03:00
hdpoliveira
421fc5bc59
Part of #9473 : Create Vehicle::InvalidateWindow
...
Converted from vehicle_invalidate_window
2020-05-01 17:24:54 -03:00
hdpoliveira
49be02dbfd
Part of #9473 : Create Vehicle::UpdateTestFinish
...
Converted from vehicle_update_test_finish
2020-05-01 17:24:53 -03:00
hdpoliveira
28c861ee7e
Part of #9473 : Create Vehicle::TestReset
...
Converted from vehicle_test_reset
2020-05-01 17:24:53 -03:00
Gymnasiast
cc65564521
Use (RCT12)ObjectEntryIndex in more places
2020-05-01 22:06:13 +02:00
tylerleamon
30e6b475a9
Fix #5451 : Guests scream on every descent, no matter how small
2020-05-01 22:05:52 +02:00
Tulio Leao
c5180a00b8
Merge individual x,y variables into ScreenCoordsXY object
2020-05-01 16:03:21 -03:00
Tulio Leao
d0704baab2
Make window_dropdown_show_text() use ScreenCoordsXY
2020-05-01 15:58:36 -03:00
Tulio Leao
4933785b1c
Make window_dropdown_show_text_custom_width() use ScreenCoordsXY
2020-05-01 15:48:20 -03:00
Michael Steenbeek
158adfba82
Merge pull request #11560 from tupaschoal/more-coordz
...
Scours through openrct2-ui to use more coords structs
2020-05-01 19:01:37 +02:00
Ted John
65a9c7a1b1
Implement expenditureType on GameActionResult plugin API ( #11514 )
...
* Implement expenditureType on GameActionResult plugin API
* Update src/openrct2/scripting/ScriptEngine.cpp
Co-Authored-By: Michael Steenbeek <m.o.steenbeek@gmail.com>
* Improve formatting of ExpenditureTypes
* Apply code review comments
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-05-01 17:50:11 +01:00
Tulio Leao
9960e4b563
Merge pull request #11552 from IntelOrca/plugin/window-tabs
...
[Plugin] Implement custom window tabs
2020-05-01 13:49:31 -03:00
Ted John
b36e4794e8
Update src/openrct2-ui/scripting/CustomWindow.cpp
...
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-01 17:19:19 +01:00
Tulio Leao
9299228f07
Use ScreenCoordsXY on windows/Ride.cpp
2020-05-01 12:58:10 -03:00
Tulio Leao
0c51528425
Use ScreenCoordsXY on windows/TopToolbar.cpp
2020-05-01 12:52:07 -03:00
Tulio Leao
1f2cf2674a
Use ScreenCoordsXY on windows/TrackList.cpp
2020-05-01 12:28:26 -03:00
Tulio Leao
28b2010838
Use ScreenCoordsXY on interface/Window.cpp
2020-05-01 12:26:01 -03:00
Tulio Leao
1da24fed40
Use CoordsXY on windows/Sign.cpp
2020-05-01 12:19:20 -03:00
Ted John
00f78cc8fa
Use ScreenCoordsXY for tab image offset
2020-05-01 13:53:28 +01:00
Michael Steenbeek
fc860e8b6e
Merge pull request #11521 from Gymnasiast/refactor/oein3
...
Make ResearchItem use ObjectEntryIndex
2020-05-01 13:28:21 +02:00
Michael Steenbeek
7895a6911e
Bump network version
2020-05-01 13:28:11 +02:00
hdpoliveira
83d88c0939
Use const& in DodgemsCarWouldCollideAt
2020-04-30 21:03:05 -03:00
hdpoliveira
864a40e22c
Use const& in wouldCollideWithDodgemsTrackEdge
2020-04-30 20:56:48 -03:00
hdpoliveira
4389670939
Improve names in UpdateDodgemsCollision
2020-04-30 20:53:18 -03:00
hdpoliveira
53f6bd8340
Part of #9473 : Create Vehicle::PeepEasterEggHereWeAre
...
Converted from vehicle_peep_easteregg_here_we_are
2020-04-30 20:53:17 -03:00
hdpoliveira
d69cc1c877
Part of #9473 : Create Vehicle::TrainHead and Vehicle::TrainTail
...
Converted from vehicle_get_head and vehicle_get_tail
2020-04-30 20:53:17 -03:00
hdpoliveira
90cd90e738
Part of #9473 : Create Vehicle::Entry
...
Converted from vehicle_get_vehicle_entry
2020-04-30 20:53:15 -03:00
hdpoliveira
c88695a29c
Part of #9473 : Create Vehicle::UpdateDodgemsCollision
...
Converted from vehicle_update_dodgems_collision
2020-04-30 20:53:15 -03:00
Ted John
65303a9f00
Fix spinner decrement buttons
2020-05-01 00:41:20 +01:00
Ted John
4ddc119886
Fix compile errors
2020-05-01 00:10:25 +01:00
Ted John
98249c777d
Implement string tooltips for plugins
2020-05-01 00:06:58 +01:00
Ted John
4501173c0d
Implement custom window tabs
2020-04-30 23:42:28 +01:00
Ted John
8798811561
Fix #11526 : Plugin: Crash when using sprite type in park.postMessage ( #11533 )
2020-04-30 19:51:47 +02:00
Michael Steenbeek
948c393bc1
Fix #8110 : Use a single name for the title sequences directory ( #11545 )
2020-04-30 18:50:26 +02:00
Michael Steenbeek
76f41285b4
Merge pull request #11511 from IntelOrca/plugin/improve-network-apis
...
Improve network plugin APIs
2020-04-30 18:50:05 +02:00
Ted John
3d2a534d3b
Fix formatting
2020-04-30 17:12:02 +01:00
Michael Steenbeek
29fcdb5392
Fix Steam RCT1 detection ( #11543 )
2020-04-30 14:49:04 +02:00
Gymnasiast
bafb63df55
Add missing RIDE_TYPE_NULL check
2020-04-30 13:58:48 +02:00
Gymnasiast
ba66751d35
Bump network version
2020-04-30 12:59:34 +02:00
Gymnasiast
6cdee9db93
Fix #7006 : Use RTDs for determining ride category
2020-04-30 12:59:18 +02:00
Gymnasiast
505ac0f1a0
Remove unused function
2020-04-30 12:59:18 +02:00
Gymnasiast
7bda0c5fd9
Create constructor for ResearchItem
2020-04-30 12:59:18 +02:00
Gymnasiast
73671bbeeb
Make ResearchItem use ObjectEntryIndex
2020-04-30 12:59:18 +02:00
Ted John
bbe7ff0d80
Refactor game action binding for plugins ( #11528 )
...
* Refactor game action binding for plugins
Adds parameter visiting for game actions to reduce code needed for binding game actions to JavaScript objects
* Apply suggestions from code review
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-30 06:56:57 -03:00
Ted John
ee8a1a86c1
Add comments and null check
2020-04-30 02:18:32 +01:00
Ted John
7897df140d
Update src/openrct2/network/Network.cpp
...
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-30 02:14:33 +01:00
Ted John
f642597098
Replace loop with std::find_if
2020-04-30 01:54:12 +01:00
Ted John
297fe537b6
Implement network.sendMessage(msg, players)
2020-04-28 22:02:14 +01:00
Ted John
d0154d08e9
Implement network join / leave hooks
2020-04-28 19:33:30 +01:00
Ted John
1f39ac014a
Run network.chat hook for server chat messages
2020-04-28 17:31:12 +01:00
Duncan
96222ebace
Merge pull request #11509 from duncanspumpkin/entity_cleanup
...
Entity cleanup
2020-04-28 10:44:28 +01:00
duncanspumpkin
fed148648c
Use IsPeep in more places
2020-04-28 07:57:47 +01:00
Gymnasiast
a1cbaf9a46
Use OBJECT_ENTRY_INDEX_NULL in more places
2020-04-28 08:38:37 +02:00
Gymnasiast
99626e4fbb
Convert RCT12 research marker defines to constexpr
2020-04-28 08:38:16 +02:00
Gymnasiast
38748fc869
Create conversion functions for entry indices
2020-04-28 08:38:04 +02:00
duncanspumpkin
63549dee57
Ensure move_sprite_to_list only used in sprite.cpp
...
After an entity is created it should never need to call this function. This will be important in later changes when the lists are changed to vectors
2020-04-28 07:27:05 +01:00
Ted John
2c731273c1
Fix #11494 : Old console commands don't work at headless console since plugin system ( #11508 )
2020-04-27 23:02:38 +02:00
Ted John
ecce4da6e8
Add ipAddress and publicHashKey properties to player API
2020-04-27 20:50:56 +01:00
duncanspumpkin
5b07a76f05
Use sprite_identifier when identifying entitys
...
The linked list index is only meant to be used for accessing the linked lists. Using the wrong variable is unlikely to cause issues for this exact case but it makes things cleaner.
2020-04-27 18:47:51 +01:00
Ted John
7b9fa972b6
Add addGroup, removeGroup, groups, players API
2020-04-27 18:39:42 +01:00
Ted John
06bbf5ddda
Implement SmallSceneryObject for getObject plugin API ( #11489 )
2020-04-27 18:41:49 +02:00
Michael Steenbeek
2e50cd44ba
Refactor ride_list_item to RideSelection ( #11505 )
2020-04-27 16:26:35 +02:00
Duncan
3c89d5ec12
Fix #11490 . Crash with error message titles ( #11502 )
...
Error message titles for rides are composed from the ride name string id and therefore require passing the error message args.
2020-04-27 15:22:33 +02:00
Michael Steenbeek
bcabc1d807
Merge pull request #11457 from Gymnasiast/refactor/rtd-forever
...
More RTD + cleanup
2020-04-27 15:11:54 +02:00
Ted John
f9909e76f2
Merge pull request #11320 from IntelOrca/epic/plug-in-4
...
Implement THE PLUGIN SYSTEM!
2020-04-26 22:50:30 +01:00
hdpoliveira
b696c0829a
Replace 8 by COORDS_Z_STEP
2020-04-26 16:13:01 -03:00
hdpoliveira
3b70b43449
snake_case to camelCase
2020-04-26 16:13:01 -03:00
hdpoliveira
cd02e28b31
Part of #9473 : Create Vehicle::UpdateMeasurements
...
Converted from vehicle_update_measurements
2020-04-26 16:13:00 -03:00
Ted John
3c02861c63
Increment network version
2020-04-26 16:01:40 +01:00
Ted John
ca98ffc697
Implement onClose event for custom windows
2020-04-26 16:01:03 +01:00
Ted John
c0aa5bdcc8
Create plugin directory automatically
2020-04-26 14:52:57 +01:00
Breno Rodrigues Guimarães
305b4d4957
Fix #11469 : Clear memory but dont increment buffer position ( #11472 )
...
Fix a regression from #11412 that did:
set_format_arg(0, rct_string_id, ...)
set_format_arg(4, uint32_t, 0)
ride->FormatNameTo(gCommonFormatArgs + 2)
Notice it continues from byte 2, and not 8.
So the `set_format_arg(4, uint32_t... )` was just
for clearing memory, not for adding a new argument
2020-04-26 10:48:35 -03:00
Ted John
7041b0793e
Fix tile type literals
2020-04-26 14:42:13 +01:00
Ted John
51ed760409
Fix FileWatcher header file
2020-04-26 14:35:09 +01:00
Ted John
2d43ac5936
Try using int32_t instead of size_t
2020-04-26 14:35:09 +01:00
Michał Janiszewski
a0877d1518
Improve dukglue's includes
2020-04-26 14:35:08 +01:00
Ted John
2c4cf49fb1
Add more const
2020-04-26 14:35:08 +01:00
Ted John
a6eeb8c7c4
Add const to ticksElapsed_get
2020-04-26 14:35:08 +01:00
Ted John
c67962577a
Rename __ENABLE_SCRIPTING__ to ENABLE_SCRIPTING
2020-04-26 14:35:08 +01:00
Ted John
4ebd8da630
Revert change to RemoveCustomGameActions
2020-04-26 14:35:08 +01:00
Ted John
4162ad0eb6
Remove unused getWindow parameter
2020-04-26 14:35:08 +01:00
Ted John
ad75cb0754
Update src/openrct2/scripting/ScriptEngine.cpp
...
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
4e1fa6a944
Update src/openrct2/scripting/ScriptEngine.h
...
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
3fe49ca2a3
Apply suggestions from code review
...
Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-Authored-By: Aaron van Geffen <aaron@aaronweb.net>
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John
127dd1543e
Disable FileWatcher for macOS
2020-04-26 14:35:08 +01:00
Ted John
c1ab8b0b31
Apply suggestions from code review
...
Co-Authored-By: Breno Rodrigues Guimarães <brenorg@gmail.com>
2020-04-26 14:35:07 +01:00
Ted John
4c45e0ceb0
Remove use of .value()
2020-04-26 14:35:07 +01:00
Ted John
6cbea2fd37
Change baseZ / clearanceZ to baseHeight / clearanceHeight
2020-04-26 14:35:07 +01:00
Ted John
2f525e0539
Apply more code review comments
2020-04-26 14:35:07 +01:00
Ted John
d480fb8daa
Apply suggestions from code review
...
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
Co-Authored-By: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-04-26 14:35:07 +01:00
Ted John
d9cbdf29ad
Ensure all paths return a value regardless of duk_error
2020-04-26 14:35:07 +01:00
Ted John
ea632a8eed
Rename thing to entity
2020-04-26 14:35:07 +01:00
Ted John
62d15e44db
Fix mingw build
2020-04-26 14:35:07 +01:00
Ted John
7f9ff121b1
Fix rebase
2020-04-26 14:35:07 +01:00
Ted John
e1c08defc8
Remove use of std::variant
2020-04-26 14:35:07 +01:00
Ted John
3c424be180
Use correct thing type for getThing
2020-04-26 14:35:06 +01:00
Ted John
f12f439309
Fix errors after rebase
2020-04-26 14:35:06 +01:00
Ted John
b9f3886ca8
Implement more footpath APIs
2020-04-26 14:35:06 +01:00
Ted John
b7b1920a79
Fix build
2020-04-26 14:35:06 +01:00
Ted John
119b24a6ff
Show selected index on custom dropdowns
2020-04-26 14:35:06 +01:00
Ted John
098e6839e2
Fix build after rebase
2020-04-26 14:35:06 +01:00
Ted John
76ebef10e3
Add APIs for getting info about loaded objects
2020-04-26 14:35:06 +01:00
Ted John
7a62d55c5f
Clean up and remove unused APIs
2020-04-26 14:35:06 +01:00
Ted John
ea8890aaaa
Improve shared storage read / write
2020-04-26 14:35:06 +01:00
Ted John
0c71886941
Implement shared storage
2020-04-26 14:35:06 +01:00
Ted John
61da82c711
Add random number generator
2020-04-26 14:35:05 +01:00
Ted John
fa997006ba
Allow console.log to take variable args
2020-04-26 14:35:05 +01:00
Ted John
a16cacff3a
Add special properties for ride action
2020-04-26 14:35:05 +01:00
Ted John
efcf9fd22a
Implement hooking game actions
2020-04-26 14:35:05 +01:00
Ted John
49b155d178
Fix Linux build
2020-04-26 14:35:05 +01:00
Ted John
83fe0cf5c5
Implement strings for GameAction errors
2020-04-26 14:35:05 +01:00
Ted John
2ad37db817
Implement registering game actions
2020-04-26 14:35:05 +01:00
Ted John
4e4379e6ef
Start work on custom game actions
2020-04-26 14:35:05 +01:00
Ted John
07ed0f5c0e
Implement query and execute of game actions
2020-04-26 14:35:05 +01:00
Ted John
f8394953aa
Get thing inhertiance working
2020-04-26 14:35:05 +01:00
Ted John
971c6e201d
Improve some of the map APIs
2020-04-26 14:35:05 +01:00
Ted John
4e12c9541e
Implement more tile element APIs
2020-04-26 14:35:05 +01:00
Ted John
82639bae1b
Implement more tile element APIs
2020-04-26 14:35:04 +01:00
Ted John
63b10166ac
Add more surface element APIs
2020-04-26 14:35:04 +01:00
Ted John
4d5e7f19ca
Implement surface style API and improve plugin calling
2020-04-26 14:35:04 +01:00
Ted John
32d72471b8
Add more tile APIs
2020-04-26 14:35:04 +01:00
Ted John
a4be43eaa9
Fix clients starting remote scripts
2020-04-26 14:35:04 +01:00
Ted John
cf9478eb76
Fix build
2020-04-26 14:35:04 +01:00
Ted John
7628289eb3
Implement reverse of string processing
2020-04-26 14:35:04 +01:00
Ted John
4d221341da
Improve string handling and allow window update
2020-04-26 14:35:04 +01:00
Ted John
09c8c6d508
Implement window colours API
2020-04-26 14:35:04 +01:00
Ted John
5c1fabec56
Implement API for spinners
2020-04-26 14:35:04 +01:00
Ted John
9dd9e600b5
Implement API for image buttons
2020-04-26 14:35:04 +01:00
Ted John
00293d20e8
Fix compile
2020-04-26 14:35:04 +01:00
Ted John
e6ca727b4b
Improve dumping of expressions
2020-04-26 14:35:04 +01:00
Ted John
c73bb63f0e
Implement window classification and number
2020-04-26 14:35:04 +01:00
Ted John
dfd45651dc
Improve stringify of expressions
2020-04-26 14:35:04 +01:00
Ted John
177c1a16a7
Always allow game state to be mutated in single player
2020-04-26 14:35:03 +01:00
Ted John
2890faee0a
Change plugin type to just local and remote
2020-04-26 14:35:03 +01:00
Ted John
e6341f0a42
Get scripting compiling on clang
2020-04-26 14:35:03 +01:00
Ted John
bac91cd563
Allow scripting to be compile-disabled
2020-04-26 14:35:03 +01:00
Ted John
34078124cd
Fix formatting
2020-04-26 14:35:03 +01:00
Ted John
a5c8ff920f
Add game mutable protection
2020-04-26 14:35:03 +01:00
Ted John
dc64d3541d
Transfer server-client scripts over network
2020-04-26 14:35:03 +01:00
Ted John
639faa2085
Fix GCC issues
2020-04-26 14:35:03 +01:00
Ted John
facd557355
Fix formatting
2020-04-26 14:35:02 +01:00
Ted John
412c838a07
Fix warnings
2020-04-26 14:35:02 +01:00
Ted John
0c1ed7b509
Implement APIs for bringToFront, findWidget etc.
2020-04-26 14:35:02 +01:00
Ted John
057155e5ab
Use a function to register plugin rather than return value
2020-04-26 14:35:02 +01:00
Ted John
d8b0b24c43
Implement date API
2020-04-26 14:35:02 +01:00
Ted John
e0f66fe3cd
Implement viewport widgets
2020-04-26 14:35:02 +01:00
Ted John
da98ef63d3
Implement checkboxes and disabling widgets
2020-04-26 14:35:02 +01:00
Ted John
a9a67a7a7e
Implement group boxes
2020-04-26 14:35:02 +01:00
Ted John
b1cf6fcf63
Implement Widget API
2020-04-26 14:35:02 +01:00
Ted John
7274e45c93
Implement main viewport API
2020-04-26 14:35:02 +01:00
Ted John
d7d880dc23
Restart plugins when starting new game from a game
2020-04-26 14:35:02 +01:00
Ted John
0ec4475d62
Implement tile x, y coordinates
2020-04-26 14:35:02 +01:00
Ted John
d3af46ad9f
Implement label widget
2020-04-26 14:35:02 +01:00
Ted John
560be19cdf
Implement Ride and RideObject API
2020-04-26 14:35:02 +01:00
Ted John
ab5bfffde0
Fix tile element scripting
2020-04-26 14:35:01 +01:00
Ted John
4b95a3a9d0
Implement custom menu items
2020-04-26 14:35:01 +01:00
Ted John
c8fbc2e529
Improve chat subscription
2020-04-26 14:35:01 +01:00
Ted John
0e8c627324
Add config option for hot reload and refactor
2020-04-26 14:35:01 +01:00
Ted John
3ac22476c6
Implement basic send message
2020-04-26 14:35:01 +01:00
Ted John
3f58a0d9f8
Implement network mode
2020-04-26 14:35:01 +01:00
Ted John
e6915e8799
Do not load plugins on title screen
2020-04-26 14:35:01 +01:00
Ted John
2e62078c30
Exclude node_modules directory
2020-04-26 14:35:01 +01:00
Ted John
4109b2c55a
Fix build errors
2020-04-26 14:35:01 +01:00
Ted John
098348d3c3
Add hooking for chat message
2020-04-26 14:35:01 +01:00
Ted John
082eaf7c9c
Add more network API
2020-04-26 14:35:00 +01:00
Ted John
5d78a1f2bf
Add initial network API
2020-04-26 14:35:00 +01:00
Ted John
5bd58118b5
Get the plugin branch building again
2020-04-26 14:35:00 +01:00
Hielke Morsink
d7123834df
Expose more footpath and footpath-adition properties
2020-04-26 14:35:00 +01:00
Hielke Morsink
9b2ed0d641
Expose properties for path scenery
2020-04-26 14:35:00 +01:00
Hielke Morsink
bec9c4da65
Expose surface element properties
2020-04-26 14:35:00 +01:00
Hielke Morsink
e8bdb95f13
format new files
...
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Hielke Morsink
c37d7d859e
Use C++ types
2020-04-26 14:35:00 +01:00
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
Gymnasiast
e67ebed697
Remove some Americanisms
2020-04-26 11:07:19 +02:00
Gymnasiast
100236c2d2
Move available ride modes to RTD; ride mode cleanup
2020-04-26 11:07:19 +02:00
Gymnasiast
2e3a4d41ce
Clean up some ride construction variables
2020-04-26 11:07:19 +02:00
Gymnasiast
8d0854804e
Replace missed check for coasters with vertical towers
2020-04-26 11:05:11 +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
Breno Rodrigues Guimarães
c0d0c7de16
Part of #11389 : Replace set_format_arg by Formatter::Common() ( #11388 )
2020-04-22 21:41:20 -03:00
Breno Rodrigues Guimarães
ef8fd20c99
Let Ride::FormatStatusTo return the number of written bytes ( #11411 )
2020-04-22 21:24:51 -03:00
Mustapha Elghoul
b138cb46ba
Name Flags in PeepThoughtToActionMap
2020-04-22 18:50:53 +02:00
Michał Janiszewski
2323cc1596
Use named casts instead of old-style casts
...
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Duncan
cfd94d4fa5
Merge pull request #11382 from mustaphaelghoul/eecs481
...
Create 5 Vehicle::CableLiftUpdate... member functions from cable_lift_update_... (#9473 )
2020-04-21 22:10:16 +01:00
Mustapha Elghoul
38630eeb59
Update dist_x and dist_y to camelCase. (1 >> 1) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_1, and (1 >> 0) to VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION
2020-04-21 16:51:00 -04:00
Breno Rodrigues Guimarães
568e60b13c
Remove duplicated code due to merge issue ( #11392 )
2020-04-21 17:10:05 +02:00
Michał Janiszewski
c4b6897635
Address possible nullptr dereferences
2020-04-21 13:31:01 +02:00
Michał Janiszewski
5f97637d5e
Only suggest final when using non-LTO builds
...
In LTO builds GCC issues the suggestion-warning from linking stage,
when pragmas are already gone and do nothing.
2020-04-21 13:31:01 +02:00
Michał Janiszewski
eeef01f34b
Remove redundant function declaration
2020-04-21 13:31:01 +02:00
Michał Janiszewski
de51d97f70
Remove redundant unreachable breaks
2020-04-21 13:31:01 +02:00
Michał Janiszewski
64e9e8aeb9
Add missing override specifier
2020-04-21 13:31:01 +02:00
Michał Janiszewski
cb74c5bbb6
Fix globals that really aren't
2020-04-21 13:30:55 +02:00
Breno Rodrigues Guimarães
374b744477
Use Formatter to handle argument formatting for tooltips ( #11379 )
2020-04-21 12:38:59 +02:00
Michael Steenbeek
b94dfab7d0
Merge pull request #11383 from tupaschoal/followup-11163
...
Simplify logic in ride_ratings_score_close_proximity_in_direction()
2020-04-21 12:36:39 +02:00
Tulio Leao
12beb78377
Use enum for PeepState instead of raw Number on NewsItem ( #11384 )
2020-04-21 12:33:53 +02:00
Mustapha Elghoul
b38bf7a438
Grouped Alike Functions in Vehicle.h
2020-04-20 22:52:22 -04:00
Tulio Leao
dedd0cd54f
Use CoordsXY on ride_ratings_score_close_proximity_in_direction()
2020-04-20 23:33:56 -03:00
Tulio Leao
a7c103261a
Use BaseZ and ClearanceZ on ride_ratings_score_close_proximity_in_direction()
2020-04-20 23:28:59 -03:00
Mustapha Elghoul
e627b1680c
Part of #9473 : Create 5 Vehicle::CableLiftUpdate... from cable_lift_update_...
2020-04-20 22:12:42 -04:00
Breno Rodrigues Guimarães
2479256bc1
Adjust Formatter function names according to coding style ( #11378 )
2020-04-20 18:55:15 -03:00
Michael Steenbeek
e1e58423fc
Replace RideTypeHasRideGroups with flag ( #11375 )
2020-04-20 21:50:35 +02:00
Olivier Wervers
fc5a5fe320
Fix #11370 : Copy and paste shortcuts switched ( #11373 )
2020-04-20 12:16:50 +02:00
ifimfree
fb6dd4bfad
Create constants for a few flags
2020-04-20 10:39:26 +02:00
Breno Rodrigues Guimarães
d4a2a98e20
Replacing set_format_arg_on macro in favor of a more C++zy solution ( #11350 )
2020-04-20 07:10:33 +02:00
Michael Steenbeek
d2cf9d46e5
Merge pull request #11365 from Gymnasiast/refactor/rtd-plus-plus
...
Move upkeep costs to RTD
2020-04-19 23:25:00 +02:00
Olivier Wervers
3830347294
Switch tile inspector copy paste button placement ( #11358 )
2020-04-19 22:41:45 +02:00
Tulio Leao
4d679b7e3e
Fix #11361 : rct_object_filters leak in EditorObjectSelection.cpp ( #11364 )
2020-04-19 16:28:01 -03:00
Gymnasiast
d2b71392cf
Move upkeep costs to RTD
2020-04-19 21:27:22 +02:00
Gymnasiast
f17014877a
Put all upkeep costs together (as an intermediate step)
2020-04-19 21:27:22 +02:00
Gymnasiast
19646a29a5
Remove duplicated code with function call
2020-04-19 21:13:20 +02:00
Gymnasiast
7d50a2d186
Move alternate ride type to RTD
2020-04-19 18:44:38 +02:00
Gymnasiast
25f363625c
Rename field in RideData5 to something more descriptive
2020-04-19 18:20:20 +02:00
Gymnasiast
9503672730
Remove unused bits from rct_ride_data_5
2020-04-19 18:10:50 +02:00
Gymnasiast
02d3be4d4f
Remove unused variable
2020-04-19 18:06:52 +02:00
Gymnasiast
99d270388b
Move ride start piece to RTD
2020-04-19 18:05:57 +02:00
Duncan
a2efc49bcd
Merge pull request #11357 from Gymnasiast/fix/1148
...
Fix #1148 : Research funding dropdown not shown in finances window
2020-04-19 16:06:49 +01:00
Breno Rodrigues Guimarães
3c1bdcd201
Create a compile-time table for converting color codepoints to utf8 ( #11349 )
...
For this to be possible, the function to convert a codepoint to urf8 was
moved to the header and made constexpr.
Now it's not necessary to store a std::string just to serve as a buffer
for holding this string. All the computation is done at compile time.
2020-04-19 15:51:01 +02:00
Michael Steenbeek
deb56c2a72
Move LiftData to RTDs ( #11347 )
2020-04-19 14:41:26 +02:00
Tulio Leao
629181b88d
Fix mistake in #11345 : Remove all Peeps also removing staff ( #11352 )
2020-04-19 14:40:25 +02:00
Gymnasiast
860924dfb0
Fix #1148 : Research funding dropdown not shown in finances window
2020-04-19 14:29:56 +02:00
Ted John
b9e85f6b90
Fix #11259 : Custom JSON object breaks saves ( #11356 )
...
Do not attempt to pack JSON objects into S6 files.
2020-04-19 14:18:12 +02:00
Michał Janiszewski
5bfc41f49e
openrct2-ui cast fixes ( #11348 )
2020-04-19 14:08:22 +02:00
Michael Steenbeek
d3a5446114
Create ride type flag for suspended rides ( #11355 )
2020-04-19 13:53:51 +02:00
Michael Steenbeek
957294568f
Use constants in ride_entry_get_supported_track_pieces() ( #11337 )
2020-04-19 13:33:01 +02:00
Michael Steenbeek
8127437de1
Reduce direct ride type checking; move available piece lookup to RTD ( #11353 )
2020-04-19 13:32:43 +02:00
frutiemax
d3b702603d
Fix #10483 : Changing footpath type won't remove the elements on it. ( #11306 )
...
Changing footpath type for an existing footpath does not remove elements on it, such as benches, lamps, etc. Also handles changes from and to queue paths properly.
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2020-04-19 07:11:15 -03:00
Duncan
6a2b4a0a27
Merge pull request #11257 from hdpoliveira/vehicle_update_9473
...
Part of #9473 : Convert cable_lift_update to Vehicle private method Ca…
2020-04-19 08:03:09 +01:00
Duncan
6570741a1c
Fix #11343 , 11344. Remove all peeps cheat causes a crash/hang ( #11345 )
...
* Fix #11343 , 11344. Remove all peeps cheat causes a crash/hang
Caused by a refactor.
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-04-18 15:43:05 -03:00
Tulio Leao
523e6ca4a0
Fix #11340 : Sound bar only working when maxed out ( #11341 )
...
The changesets replacing c-style casts with named casts mistakenly added some parentheses in the wrong place, changing the evauluation order.
2020-04-18 20:21:30 +02:00
hdpoliveira
fd111403f1
Part of #9473 : vehicle_update_track_motion to Vehicle::UpdateTrackMotion
2020-04-18 14:41:47 -03:00
hdpoliveira
bbdd70395f
Part of #9473 : vehicle_current_tower_element_is_top to Vehicle::CurrentTowerElementIsTop
2020-04-18 14:41:47 -03:00
hdpoliveira
49b37aafe8
Part of #9473 : vehicle_check_if_missing to Vehicle::CheckIfMissing
2020-04-18 14:41:35 -03:00