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

15475 Commits

Author SHA1 Message Date
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
Simon Jarrett
0c58dfa1b3 Refactor objects to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett
97b44a7181 Refactor ObjectFactory to use new JSON library
- Removed a few try-catch blocks as this is now handled in Json::Read[...]
2020-09-16 20:18:53 +01:00
Simon Jarrett
5f17554c25 Refactor ObjectJsonHelpers
Move functions in ObjectJsonHelpers to their relevant namespaces and classes
- Move ParseColour to Colour::FromString
- Move ParseCursor to Cursor::FromString
- Move LoadStrings to StringTable::ReadJson
- Move LoadImages to ImageTable::ReadJson
- Move ParseObjectEntry to Object::ParseObjectEntry
- Move GetString, etc. to Json::GetString, etc.
- Delete ObjectJsonHelpers .cpp and .h files
2020-09-16 20:18:53 +01:00
Simon Jarrett
1b821c1059 Refactor ServerList to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett
651a2951a1 Refactor NetworkUser to use new JSON library
- Removed the ToJson(json_t) method
- The FromJson method expects to receive a JSON node of type object (as per added documentation)
- Unlike elsewhere, we need to use iterators for the Save() method to allow us to remove items from the array
2020-09-16 20:18:53 +01:00
Simon Jarrett
de9a16404b Refactor NetworkServerAdvertiser to use new JSON library
- the body.dump() calls throughout use the default indent parameter of -1 so will produce JSON with no whitespace
- OnRegistrationReponse must be passed a JSON node of type object
2020-09-16 20:18:53 +01:00
Simon Jarrett
c655d47dd3 Refactor NetworkGroup to use new JSON library 2020-09-16 20:18:53 +01:00
Simon Jarrett
f1bcf20050 Refactor NetworkBase to use new JSON library 2020-09-16 20:18:52 +01:00
Simon Jarrett
324e94e6ce Fix #9088: refactor JSON code to use a more modern C++ library
- Removed dependency on jansson
- Implemented nlohmann JSON for Modern C++
- Moved generic GetString, etc., helper functions out of ObjectJsonHelpers.hpp to Json.hpp
- Added GetEnum helper function
- Added AsObject and AsArray helper functions
- Removed GetStringArray, etc., helper functions as they're not needed with the better language features
- Added second GetFlags definition that allows specifying inverted flags - this is a bit cleaner than previous hacks
- Comments!
2020-09-16 20:18:52 +01:00
Matt
3eff713765 Remove unused Registration.hpp 2020-09-16 20:23:39 +03:00
Matt
16fc41e6bf Always return unique_ptr for the IniReader/IniWriter interface 2020-09-16 20:23:39 +03:00
Matt
d0d5cc5179 Remove unused declarations 2020-09-16 20:23:34 +03:00
frutiemax
af591c834b Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1) (#12938)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset (1)

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-16 00:02:22 -03:00
Michael Steenbeek
3acbb92074 Merge pull request #12922 from Gymnasiast/LetItSnow2 2020-09-15 18:11:45 +02:00
Tulio Leao
c1729c8a87 Merge pull request #12858 from ju-pinheiro/network-strong-enums
NETWORK_PERMISSION and NETWORK_AUTH replaced by strong enums
2020-09-15 08:07:19 -03:00
Gymnasiast
a46a21973f Amend changelog; bump network version 2020-09-14 22:00:54 +02:00
Gymnasiast
ce325fdb9b Also set proper temperature when using weather cheat 2020-09-14 22:00:54 +02:00
Gymnasiast
ac985a8d61 Do not transition to snow for now 2020-09-14 22:00:54 +02:00
Brett
c9de4f49fe Add snow as a weather type
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-14 21:58:00 +02:00
Gymnasiast
31d20cefb2 Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
rpstester
f7348b1f06 Close #12389: Refactor PeepSittingSubState (#12908)
* Refactor PeepSittingSubState

* Fix formatting
2020-09-14 20:11:17 +01:00
frutiemax
2857f9d276 Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp (#12906)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-14 08:44:50 -03:00
Richard Fine
4f31ddaca4 Make menu data declarations local to the functions using them 2020-09-13 16:30:17 -04:00