Commit Graph

1285 Commits

Author SHA1 Message Date
Duncan 5dba30778d
Code style: Remove more snakes from the park, maphelper, scenery. (#18222) 2022-10-08 06:56:17 -03:00
duncanspumpkin 16581e9288 Address snakes in mapgen and map animation 2022-10-05 20:22:51 +01:00
duncanspumpkin 2a593b6029 Remove snake cases from Location and LargeScenery 2022-10-05 20:21:56 +01:00
duncanspumpkin 3e8dc1b2ac Remove snakes from the foopaths 2022-10-04 20:08:14 +01:00
duncanspumpkin 2c29190ff8 Remove snakes from entrance 2022-10-04 20:07:35 +01:00
Duncan 85929e5914
Remove snakes from construction clear (#18185) 2022-10-04 10:06:23 +01:00
Duncan 3565a0172d
Attack snakes in banners and climate (#18163) 2022-10-01 18:54:15 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Michael Steenbeek a0dd6a3aa6
Fix #18087: gCash clamped to 32-bit integer every transaction 2022-09-28 12:20:44 +02:00
73 a8073f6bd5
Increase limit on Loan Interest from 80% to 255%
Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2022-09-27 12:20:01 +02:00
Gymnasiast f5f4a8a2f6
Use gMapSize instead of MAXIMUM_MAP_SIZE_TECHNICAL in appropriate places
Backported from my map size refactors.

These functions previously scanned the whole map,
so this might also provide a slight performance boost (not tested).
2022-09-22 16:19:46 +02:00
Michael Steenbeek 31e2d7692c
Rename more instances of “vehicle” to “train” 2022-09-22 11:22:18 +02:00
Gymnasiast c1149895fa
Close #17955: Make ratings setting networked and freeze them 2022-09-21 19:15:10 +02:00
Yuvraj Tetarwal 90b6cdb62e
Fix #17904: Trees are removed at no cost to make way for ride entrance/exits 2022-09-05 22:49:16 +02:00
Rik Smeets 5c596eae5d Extract maze cost calculation 2022-08-22 19:29:56 +02:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Michael Steenbeek d9e23e9dfa
Use ride_type_t instead of uint8_t in more places (#17803)
Part of preparation for making ride types into objects.
2022-08-13 21:49:19 +02:00
Duncan adc51ad9aa
Rework rct_vehicle_colour (#16051)
* Remove rct_vehicle_colour and replace with VehicleColour

* Update network version

* Update replay version
2022-08-13 19:30:30 +00:00
Michael Steenbeek 49215a52cf
Remove unnecessary pops from some strings (#17805) 2022-08-13 20:12:30 +02:00
Michael Steenbeek 5661da1c68
Unwrap game action compat wrappers 2022-08-11 00:00:58 +02:00
Michael Steenbeek 39722307d2
Fix #11746: Cannot set ride or shop prices in some circumstances (#17765) 2022-08-09 18:06:21 +00:00
Michael Steenbeek 746722df1b
Fix #17703: (undefined string) when building on invalid height 2022-08-06 15:42:51 +02:00
frutiemax 6868b3dcaf
Rename IS_SHOP to IS_SHOP_OR_FACILITY and use it for RideObject 2022-08-06 15:00:52 +02:00
frutiemax 76104cbbee
Use RIDE_TYPE_FLAG_IS_TOILET 2022-08-06 15:00:52 +02:00
Michael Steenbeek 840f497d85
Merge pull request #17663 from frutiemax/RTD_PoweredLaunchBlock
Convert PoweredLaunch to PoweredLaunchBlockSectioned when block brake
2022-08-03 20:09:36 +02:00
Gymnasiast b54ef13c4f
Implement cleaner method for checking mode availability 2022-08-03 19:42:43 +02:00
frutiemax 293370c3c5 Convert PoweredLaunch to PoweredLaunchBlockSectioned when block brake 2022-07-31 17:58:58 -04:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Michael Steenbeek 0bfc151ab9
Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
Michael Steenbeek a75cc10dd5
Refactor Ride::Open, Ride::Test not to use gGameCommandErrorText 2022-07-28 14:23:33 +02:00
Sadret ed18ef1146
Fix #16392: Scenery on sloped surface is placed at wrong height. (#17343)
* Fix #16392: Scenery on sloped surface is placed at wrong height.

* fix SceneryQuadrantOffset

* fix valley land height

* Bump network version

* update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-07-20 20:33:33 +01:00
8street 213696ea27
Add option to sell merchandise in random colours
Co-authored-by: 8street <nikolai_e@rambler.ru>
2022-07-12 22:20:49 +00:00
Hielke Morsink fd5c5f546c
Fix #16476: Crash on demolishing maze 2022-07-12 20:28:16 +00:00
Hielke Morsink 2936de5c86
Replace hardcoded 255/0xFF with TUNE_ID_NULL 2022-06-28 22:55:25 +02:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
jensj12 d071693808
Remove double check in LandSetHeightAction (#17027) 2022-05-16 22:12:19 -03:00
frutiemax 9971ca15ad
Use ride->GetRideTypeDescriptor() in Maze related game actions 2022-05-14 18:19:00 +00:00
Ted John 0b9184b99b Avoid overwriting _currentTrackPieceDirection when placing TD 2022-05-10 22:41:09 +01:00
Michael Steenbeek 29d123b79d
Minor code refactor aimed at optimization code (#17055)
* Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors

* Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen

* Fix: Main thread can reallocate data of worker threads

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-05-07 20:18:09 +02:00
germanaizek 0045aed7f9
Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors 2022-05-07 16:05:38 +02:00
hobyr 4035139f31
Fix #17104: Changing map size does not invalidate park size 2022-05-07 13:41:15 +00:00
Michael Steenbeek f127a2c8bc
Fix: “Remove litter” cheat does not empty litter bins 2022-04-27 23:17:23 +02:00
Michael Steenbeek c8d00a4a62
Merge pull request #16958 from IntelOrca/fix/16478-park-no-money
Fix  #16478: No money in .park scenarios
2022-04-16 22:13:50 +02:00
norisa118 483548120b
Fix #16879: TED::Price is price modifier, not price (#16962)
* Fix #16879: TED::Price is price modifier, not price

Change unit type to uint32_t, change name to 'PriceModifer' &
add comment on how to use PriceModifier.
2022-04-14 20:36:39 +01:00
Ted John 11f4993c03 Remove no money scenerio flag 2022-04-09 12:36:31 +01:00
Duncan 5760f11349
Simplify Track Cost calcs (#16940)
* Multiply out 5 in track cost calcs and use _GBP

* Fix typo on Hypercoaster conversion

* Use two decimals for literals converted by _GBP

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-04-07 11:35:11 +01:00
Tulio Leao e63432a416 Add ToGBP function to convert non literals to money32 2022-03-31 17:54:52 -03:00
Geoff Banh 85baa6f7ca Fix #14093: Replace MONEY macro with user defined literal 2022-03-29 07:23:35 -03:00
tupaschoal ab86d19510
Apply review requests 2022-03-28 20:40:53 +02:00
lawrence 4c14d38325
Fix #16308: Use void* on Android and Any on other platforms 2022-03-28 20:38:33 +02:00
lawrence 5f417987bc
Fix #16308: Crash when trying to place down a ride on Android 2022-03-28 20:38:08 +02:00
Duncan 36e1a10431
Revert some of #16477 and fix scenery costs (#16877)
Split up supports and clearance costs

Add notes
2022-03-25 21:47:19 +00:00
Duncan ba8690d970
Move *10 on removal/price to the object load function (#16846)
This simplifies the code and ensures that money32/16 is at the same base for all users of these objects
2022-03-22 21:35:44 +00:00
Ted John fc2ed95641
Merge pull request #16831 from IntelOrca/feature/ternary-scenery-colours
Implement tertiary colours for small and large scenery objects.
2022-03-20 19:24:47 +00:00
Ted John 793acf67ae Implement small scenery ternary colours 2022-03-20 18:53:11 +00:00
Michael Steenbeek e78c29ea5c
Fix most occurrences of ‘ternary’ (#16832) 2022-03-20 19:22:05 +01:00
Ted John e9e377ac09 Implement large scenery ternary colours 2022-03-20 18:12:39 +00:00
Charles Machalow e27d5f154b
Add parameters to accept for StaffFireAction (#16816)
* Add parameters to accept for StaffFireAction

* Bump plugin api version

* Update src/openrct2/actions/StaffFireAction.cpp

Co-authored-by: Ted John <ted@brambles.org>

Co-authored-by: Ted John <ted@brambles.org>
2022-03-20 08:59:57 -03:00
Ted John f8224150d5 Validate patrol area location 2022-03-12 10:43:41 +00:00
Ted John 38d36acef3 Add patrol area tool window 2022-03-12 10:43:41 +00:00
Ted John 90718ca81c Refactor patrol area class to new file 2022-03-11 18:39:04 +00:00
Bas 078078416b Replace all 'cars_per_flat_ride' 0xFF with 'NoFlatRideCars' 2022-03-04 20:21:15 +01:00
Bas d239529a73 Fix “Disable vehicle limits” cheat giving all new rides 32 trains 2022-03-03 22:26:33 +01:00
Duncan 66b8f283eb
Rename flag and reorg ghost remove flags (#16734) 2022-02-27 22:39:55 +00:00
Silent 795144662a
Fix #11752: Track pieces with fractional cost are too cheap to build (#16477)
Fixes an inconsistency wuth RCT2 where track prices with a fractional part
did not have their price rounded up when building, but did when refunding.
This created an exploit where refunding such a track piece granted the player
0.50€ more than they spent on the piece.
2022-02-19 17:47:13 +00:00
Hielke Morsink ad0a2a8f96
Remove entrance/exit location functions 2022-02-18 23:28:17 +02:00
Hielke Morsink f06645d2f7
Make stations a private std::array and use getters for access 2022-02-18 23:21:35 +02:00
Hielke Morsink f47c1b9f96
Close #16468: Use TIdentifier for StationIndex 2022-02-18 23:11:07 +02:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
ζeh Matt 0a67426799
Add MAX_ENTITIES check in PeepPickupAction 2022-02-17 18:40:18 +02:00
ζeh Matt d7f5003943
Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 3d2420c86c More code review changes 2022-02-14 23:15:59 +00:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
Gymnasiast 49ccc21d84
Fix #16576: Cannot select vehicle types with entry index >= 256 2022-02-12 20:43:45 +01:00
ζeh Matt c0474d2d27
Merge pull request #16466 from ZehMatt/refactor/identifier-rideid
Use TIdentifier for RideId
2022-02-12 11:23:54 -08:00
ζeh Matt f4d105f843
Remove NetworkRideId 2022-02-12 18:11:18 +02:00
ζeh Matt 06e430157f
Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02: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 f0ee220ec6
Fix messages [ci skip]
Co-authored-by: pizza2004 <chad@neejean.org>
2022-02-12 12:28:37 +01:00
Gymnasiast 635a6507eb
Fix #16572: Refactor error made in #15403 2022-02-12 00:43:32 +01:00
Duncan 5157b57a15
OpenRCT2 Limits (#16088)
* Move over max rides to limits file

* Move max stations to limits file

* Move over max inversions, golf holes, helices, custhistsize

* Move over max trains per ride

* Bring over Max cars per train and max circuits per ride

* Port over NumColourSchemes and max vehicle colours

* Fix compilation

* Move over max awards

* Move over max peep spawns and park entrances

* Fix rebase issues

* Remove future work

* Switch style

* Update copyright
2022-02-01 20:59:48 +00:00
ζeh Matt dea22ad951
Refactor RideCreateAction to pass entrance object explicitly 2022-01-29 17:07:31 +02:00
ζeh Matt 383412252c
Only modify gLastEntranceStyle for the callee of the game action 2022-01-29 16:42:27 +02: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
GalBr fae4e6323f
Fix #16234: Wrap vehicle colors when there are more than 32 trains (#16323)
* Wrap vehicle_colours in TrackDesignAction

* Wrap the color presets in set_vehicle_colours_to_random_preset

* Increment network version

* Update changelog.txt

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-01-08 19:03:58 -03:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Gal B 367fcaad3c Refactor MazeGetSegmentBit to use const CoordsXY& 2021-12-22 18:48:37 +02:00
Gal B 343f9bbca0 Refactor maze_set_track to use const CoordsXYZD& 2021-12-22 18:48:37 +02:00
Gymnasiast ef6f2cceee
Create RideConstruction.h 2021-12-18 20:27:13 +01:00
Duncan 3572c3f466
Fix #16201: Rides don't get properly deleted when you remove them (#16236)
* Fix #16201. Remove all tracks on a tile when demolishing

* Bump network version
2021-12-14 12:37:35 +00:00
Gymnasiast 9b81bacecd
Move ride_remove_peeps() to method 2021-12-12 12:31:19 +01:00
Michael Steenbeek 27cbb6c6ae
Merge pull request #16190 from Gymnasiast/refactor/normalised-tile-element-type-3
Part of #15485: normalise all OpenRCT2 tile element types
2021-12-12 09:53:09 +01:00
ζeh Matt cec30e093d
Merge pull request #15991 from ZehMatt/refactor/bannerid
Use TIdentifier for BannerIndex
2021-12-11 08:08:27 -08:00
Gymnasiast aa34f0f760
Drop the N postfix 2021-12-11 00:39:39 +01:00
Gymnasiast fc3ce3294c
Move over switches to normalised tile element types 2021-12-11 00:30:59 +01:00
Michael Steenbeek 2d1af0ec42
Replace many GetType() calls with GetTypeN() 2021-12-10 22:43:17 +01:00
ζeh Matt a79e2a375a
Move staff_set_name to Staff 2021-12-03 17:40:27 +02:00
Duncan 79b12d2953
Introduce DATLimits.h for RCT2 Dat file object limits (#16034) 2021-12-01 21:55:52 +00:00