1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00
Commit Graph

15498 Commits

Author SHA1 Message Date
Vinicius Sa
ca8fa55fdb Use EnumValue to get the underlying value of an enum
Applied to objects of the enum class PeepActionSpriteType when they are
used as arrays subscripts.
2020-09-29 11:15:07 -03:00
Vinicius Sa
f8dd0a57aa Refactor PeepActionSpriteType to use strong enum 2020-09-29 11:15:04 -03:00
Ben Johnston
147daa8f01 Refactor PARK_AWARD to use strong enum (#13017)
* Refactor PARK_AWARD to use strong enum
2020-09-28 21:48:03 -03:00
Duncan
3c8adb1fc1 Remove gMapTooltip format args global (#12971)
Fix mistake
2020-09-28 21:45:28 -03:00
Aaron van Geffen
a0341a7aeb Fix #13021: Mowed grass and weeds don't show up (#13031) 2020-09-28 21:44:29 -03:00
Gymnasiast
84201678ca Add comment 2020-09-28 21:41:50 +02:00
Matt
213b6cc672 Use unique_ptr for GetStreamFromRCT2Scenario 2020-09-28 21:17:28 +02:00
Gymnasiast
5f0aed0929 Add .sea support to New Scenario list and extension handling 2020-09-28 21:17:28 +02:00
Łukasz Pękalski
d1cd2e08b5 Close #12388, refactor PeepState to use strong enum (#12927)
* Close #12388, refactor:PeepState to use strong enum

* refactor: refactored file PlayTests.cpp

* refactor: change PEEP_STATE_ to PeepState:: and camel case after merging

chore: code reformatting
2020-09-28 15:51:49 -03:00
Aaron van Geffen
d27e14f45b Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
ζeh Matt
54edba2272 Merge pull request #13023 from gsckoco/make_add_news_item_assoc_optional
Make add_news_item assoc optional
2020-09-28 20:28:45 +03:00
Łukasz Pękalski
065da23b3b Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00
gsckoco
391dabc4f9 Made add_news_item argument assoc optional 2020-09-28 12:28:31 +01:00
Tulio Leao
8f5ee758ee Fix #3200: Close Construction window upon selecting vehicle page (#13022) 2020-09-28 07:37:22 -03:00
Michael Steenbeek
3c07a9e49b Allow opening Objective options via console (#13000) 2020-09-27 21:53:31 -03:00
Duncan
4ec10837a6 Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required

* Remove common from Guest window where possible
2020-09-27 21:09:08 -03:00
Richard Fine
a1222fa4ca Staff code cleanup (#12907)
* Make UpdateFixing*() methods use const where possible

To make it clearer which steps actually modify the ride being fixed and which do not, pass const Ride* instead of Ride* where possible.

* Extract maximum litter search distance to a constant

* Make peep_update_*() methods return bool

* Use Direction type and helpers where applicable

* Const correctness and other cleanup

Make many functions take a const Peep* / const Staff* to clarify that they do not modify the peep being passed in. Also use the Direction type for some return values, and simplify staff_is_location_on_patrol_edge.

* Use clearer expression of constant value

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Convert staff functions to members

* Remove AsStaff const overload

* Use As<Staff>() instead of static_cast

* Simplify direction selection code

* Clean up use of magic constants

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-27 21:07:09 -03:00
Tulio Leao
d01dcea98a Release v0.3.1
- Feature: [#10807] Add 2x and 4x zoom levels (currently limited to OpenGL).
- Feature: [#12703] Add scenario plugin APIs.
- Feature: [#12708] Add plugin-accessible names to all game actions.
- Feature: [#12712] Add TCP / socket plugin APIs.
- Feature: [#12840] Add Park.entranceFee to the plugin API.
- Feature: [#12884] Add BaseTileElement.occupiedQuadrants to the plugin API.
- Feature: [#12885] Add SmallSceneryElement.quadrant to the plugin API.
- Feature: [#12886] Make all scenery placement and remove actions available to the plugin API.
- Feature: [#2350, #12922] Add snow, heavy snow and blizzard to weather types.
- Fix: [#400] Unable to place some saved tracks flush to the ground (original bug).
- Fix: [#5753] Entertainers make themselves happy instead of the guests.
- Fix: [#7037] Unable to save tracks starting with a sloped turn or helix.
- Fix: [#12691] Ride graph tooltip incorrectly used count instead of number string.
- Fix: [#12694] Crash when switching ride types with construction window open.
- Fix: [#12701] Silent NSIS setup flag /S isn't silent, upgrade pop-up appears anyway.
- Fix: [#12737] Space Rings draw the same vehicle 4 times.
- Fix: [#12756] Scenario Editor crashing the game on macOS.
- Fix: [#12764] Rides don't start aged anymore.
- Fix: [#12818] Ride price not ignored in free-rides parks.
- Fix: [#12820] Title menu buttons not invalidating properly
- Fix: [#12845] Deleting ride with active ad campaign creates incorrect notification.
- Fix: [#12857] Incorrect Peep thoughts in imported RCT1 parks.
- Fix: [#12881] Guests' favourite rides are not listed in the guest window.
- Fix: [#12910] Plugin API: getRide sometimes returns null for valid ride IDs.
- Fix: [#12912] Plugin: selectedCell of CustomListView is being ignored on creation.
- Fix: [#12918] Cannot place vanilla TD6 tracks of the Hypercoaster, Monster Trucks, Classic Mini Roller Coaster, Spinning Wild Mouse and Hyper-Twister types.
- Fix: Incomplete loop collision box allowed overlapping track (original bug).
- Improved: [#12806] Add Esperanto diacritics to the sprite font.
- Improved: [#12837] Arabic text is now drawn and shaped correctly on Windows.
- Improved: [#12890] Add stroke to lowercase 'L' to differentiate from capital 'I'.
- Technical: [#12749] The required version of macOS has been lowered to 10.13 (High Sierra).
2020-09-27 17:57:34 -03:00
Tulio Leao
afff2c10f2 Add new backtrace token for v0.3.1 2020-09-27 17:35:46 -03:00
Michał Janiszewski
8daca5b69e Add better controls over MinGW jobs to CMake 2020-09-27 20:29:49 +02:00
Matt
958f3824c9 Fix #12969: Crash opening ride window with invalid mechanic assigned 2020-09-27 13:40:40 +03:00
Aaron van Geffen
62b13e68bc Fix #13005: Last player action is not truncated (#13007) 2020-09-27 11:41:28 +02:00
Michał Janiszewski
17e86a61c9 WinNT5.1 networking fixes (#12759) 2020-09-24 10:28:24 +02:00
Michael Steenbeek
e5ec74feaf Fix #12918: Cannot place "Blue Hurricane" (hypercoaster) (#12982)
The track design was recognised as a Corkscrew RC, not as a Hypercoaster. Moved the conversion code from the track design repository to the TD6Importer (where it should have been, really).

This also fixes the issue that Hypercoasters, Monster Trucks, Classic Mini Roller Coasters, Spinning Wild Mouses and Hyper-Twisters placed from a track design have the wrong ride type.
2020-09-21 22:42:25 +02:00
Michał Janiszewski
0ae86d0558 Don't use empty resolutions (#12980) 2020-09-20 23:13:10 -03:00
Richard Fine
4030d9050e Fix #12974: unable to build fences on slopes (#12975)
Fix the casing of 'isAllowedOnSlope' to match the way it is cased in the JSON files, which causes the flag to be read correctly and re-enables building on slopes for the scenery pieces which have it specified.
2020-09-20 06:54:01 +01:00
Duncan
124161b459 Implement copy constructors (#12970) 2020-09-19 13:58:05 +01:00
Michael Steenbeek
4a79e9305f Replace gfx_draw_string_right() with DrawTextBasic (#12966) 2020-09-18 21:39:00 -03:00
Michael Steenbeek
fd194d0e32 Allow compilation with nlohmann/json < 3.9.0
According to the [API docs](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp#L23219-L23222), the fourth argument (which allows ignoring comments) was only introduced in version 3.9.0 (released on 27 July 2020), which is not present in Ubuntu 20.04 (it only has 3.7.3-1).

Since comments are not part of the JSON spec, this option is not terribly useful anyway. I have removed it, so that it can now compile on Ubuntu 20.04, and possibly also earlier versions.
2020-09-19 00:19:39 +02:00
Gymnasiast
a896d238b1 Remove optional arguments to json_t::parse 2020-09-18 23:46:07 +02:00
Michael Steenbeek
77e22851cc Merge pull request #12925 from richard-fine/dropdown-menus-static-data
RFC: Dropdown menus static data
2020-09-18 23:37:26 +02:00
Gymnasiast
72c13c8e77 Allow compilation with nlohmann/json < 3.9.0 2020-09-18 23:31:09 +02:00
Gymnasiast
265429c85a Fix compilation on 32-bit Windows and MinGW 2020-09-18 20:54:36 +02:00
Ted John
c204767176 Fix RTL for Windows 2020-09-18 19:46:12 +02:00
Gymnasiast
4ff77ebc35 Split RTL implementations to files; add preprocessor guards 2020-09-18 19:46:12 +02:00
Gymnasiast
f11d1294fe Use FriBidi on Windows, ICU on the rest 2020-09-18 19:46:12 +02:00
Gymnasiast
751810fc24 Use FriBidi for Bidi and shaping instead of ICU 2020-09-18 19:46:12 +02:00
Duncan
da82144bfb Fix #12944. Mistake from refactor meant formatter optimised away (#12961)
Not sure why it should get optimised away but this will fix the crashes.
2020-09-18 09:25:17 +01:00
Tulio Leao
c72f547606 Merge pull request #12916 from richard-fine/pathfinding
Pathfinding cleanup
2020-09-17 17:58:31 -03:00
Matt
b3b9a348c5 Apply review suggestions 2020-09-17 22:16:05 +03:00
Matt
38e03ae45d Use the Formatter for News items 2020-09-17 22:14:36 +03:00
Matt
ccde06ab0f Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Matt
2639349925 Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Michael Steenbeek
1982e8491b Merge pull request #12667 from mwnciau/json-refactor
Migrate JSON library to JSON for Modern C++
2020-09-17 21:11:06 +02:00
Richard Fine
b57ed85098 Fixes from review feedback 2020-09-16 21:24:35 -04:00
Simon Jarrett
f3aba68e46 Update project build files 2020-09-16 20:18:54 +01:00
Simon Jarrett
660c137958 Refactor Version to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett
2c92c652e2 Refactor ObjectLoadError to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett
57a57b0c02 Refactor Theme to use new JSON library 2020-09-16 20:18:54 +01:00
Simon Jarrett
12dfa74eef Refactor CmdlineSprite to use new JSON library 2020-09-16 20:18:54 +01:00