Commit Graph

19490 Commits

Author SHA1 Message Date
Tiago A. Reul 97427743a4
Clean up SpritBoundBox2 2023-06-21 01:24:04 +02:00
Matthias Moninger ce1695fab8
Merge pull request #20404 from duncanspumpkin/rideWindow
Ride Window refactor
2023-06-21 01:34:40 +03:00
Severin Paul Höfer 4b39298803 Bump network version 2023-06-20 23:17:56 +02:00
zzril d6ffdb0aa1 Add Pitch values for steep diagonal drops to checks in UpdateScreamSound
The checks in UpdateScreamSound (rct2: 0x006D796B) forgot about (steep)
diagonal drops. This resulted in riders' screams getting cut-off on
(long) steep diagonal drops once the last car reached the maximum drop
angle, and the screams re-starting as soon as the first car reached the
valley.
2023-06-20 23:17:56 +02:00
duncanspumpkin f0658202ef Fix mistake 2023-06-20 08:52:00 +01:00
duncanspumpkin 9b8b672507 Finish linking up parts 2023-06-20 08:42:25 +01:00
Matthias Moninger 1d74d44824
Merge pull request #20418 from Gymnasiast/fix/20417
Fix #20417: Plugin windows missing the left title bar border
2023-06-19 22:41:35 +03:00
Michael Steenbeek 20fe5a29d3
Add missing Ukrainian letters (Єє and Ґґ) 2023-06-18 23:44:44 +02:00
Gymnasiast 11de002a55
Fix #20417: Plugin windows missing the left title bar border 2023-06-18 22:45:35 +02:00
ζeh Matt 4bffa72c45
Fix #20413: Crash attempting to navigate an empty console history 2023-06-18 15:39:26 +03:00
ζeh Matt ffa65cea0e
Exclude the 'All' tab when searching for scenery group 2023-06-17 16:40:57 +03:00
duncanspumpkin 5e71fd4796 Hook up events 2023-06-16 09:00:52 +01:00
duncanspumpkin 825634360b Finish initial sweep 2023-06-16 08:13:20 +01:00
duncanspumpkin 75799d3be5 Start refactor of ride window 2023-06-15 21:24:56 +01:00
Severin Paul Höfer ed875a1273
Fix #19860: `TRACK_ELEM_FLAG_DOWN` flag missing on downward wide curves (#20386)
* Fix TRACK_ELEM_FLAG_DOWN flag on wide curves

* De-anonymize contributors entry

* Bump network version
2023-06-15 20:27:18 +01:00
Matthias Moninger d9a565dd21
Fix #20361: Crash when using random map generation (#20400)
* Fix #20361: Crash using map generation

* Update changelog.txt
2023-06-15 20:27:00 +01:00
Michael Steenbeek 1b612b5a99
Add code to draw Cyrillic characters Ѕѕ, Іі, Її, and Јј (#20393) 2023-06-15 20:30:02 +02:00
Josh Trzebiatowski 08e352405b
Fix #19832: Scenery Search 2023-06-14 13:04:21 +02:00
Matthias Moninger f92212edaf
Fix input cursor blinking too fast (#20366) 2023-06-09 08:24:32 +01:00
ζeh Matt 65fa73a4fb
Fix peep pickup being frame rate dependent 2023-06-08 01:45:45 +03:00
Michael Bernardi 9c5c1eb858 Fix #20349: Tile inspector creates map animations 2023-06-06 21:55:15 +02:00
Luke Hobbs 4fcf4ac7e5 Fix formatting 2023-06-03 09:38:40 -04:00
Luke Hobbs a17ac8a92b Use ErrorTitle + ErrorMessage instead of newline 2023-06-03 09:36:05 -04:00
Luke Hobbs 27eec48c16 Fix formatting 2023-06-02 22:55:45 -04:00
Luke Hobbs c1f75a0906 Add plugin name to CustomAction and ScriptEngine 2023-06-02 22:04:05 -04:00
Matthias Moninger 90b65cd890
Merge pull request #20267 from ZehMatt/improve-ridelist
Improve performance of ride list window
2023-06-02 22:53:21 +03:00
ζeh Matt c4c3743a6b
Fix formatting 2023-06-01 01:25:07 +03:00
ζeh Matt cba6238ede
Queue game actions when issued from UI 2023-06-01 01:20:31 +03:00
ζeh Matt 0f00ad2dd2
Signal that we are inside the update phase in the right function 2023-06-01 01:17:02 +03:00
ζeh Matt 68485e20d0
Revert #20286 2023-05-31 18:21:33 +03:00
Gymnasiast 2779e82ced
Return a full error message when the object cannot be found 2023-05-27 14:47:54 +02:00
Gymnasiast 0519dec33a
Fix #20083: Cannot use terrain surfaces with ID > 32 2023-05-27 14:47:49 +02:00
Matthias Moninger 29bd730329
Merge pull request #20265 from Broxzier/bugfix/20262-random-rct1-theme-silence
Fix #20262: random title theme can pick RCT1 when unavailable
2023-05-26 20:56:05 +03:00
Matthias Moninger d189008747
Merge pull request #20291 from ZehMatt/guest-refactor
Small Guest refactor
2023-05-26 20:40:12 +03:00
Hielke Morsink 58a8e8836a
Fix #20262: random title theme can pick RCT1 when unavailable 2023-05-26 19:38:59 +02:00
Tiago A. Reul 93c1a9724e
Remove flag RIDE_TYPE_FLAG_HAS_NO_TRACK (#20239) (#20249)
* Remove flag RIDE_TYPE_FLAG_HAS_NO_TRACK (#20239)

* Fix a couple of logical conditions in entity/Staff.cpp

* Bump NETWORK_STREAM_VERSION and add myself to contributors.md
2023-05-26 14:08:28 +03:00
ζeh Matt 1442e19166
Improve performance of ride list window 2023-05-25 20:43:30 +03:00
ζeh Matt 12bc9777d3
Cleanup calls to GetShopItemDescriptor in Guest::DecideAndBuyItem 2023-05-25 17:50:09 +03:00
ζeh Matt 454c5aa819
Use unsigned type for ScenarioRand 2023-05-25 17:46:27 +03:00
ζeh Matt b3606566c4
Fix #20285: Workaround to disable tweening when updated from UI 2023-05-24 01:02:11 +03:00
ζeh Matt 65b582afb0
Add a way to invalidate entity tweening 2023-05-24 00:43:23 +03:00
duncanspumpkin 3f2126662f Properly remove the object override code 2023-05-23 21:43:52 +01:00
duncanspumpkin 86c02b839f Format and fix tests 2023-05-22 20:07:06 +01:00
duncanspumpkin dbb04f6a94 Further removal 2023-05-22 08:52:43 +01:00
duncanspumpkin b58a17c731 Remove localisation object overrides 2023-05-22 08:50:19 +01:00
duncanspumpkin 8f53c6dbd3 Remove bad identifier users
Note this doesn't actually do anything under the hood it will do the same thing for now
2023-05-22 08:46:15 +01:00
ζeh Matt 94525e1742
Fix #20250: Entity tweening corrupting entity positions changing parks 2023-05-22 04:31:48 +03:00
Matthias Moninger b9382ae9fc
Disallow firing staff who are currently fixing or inspecting rides (#20260)
* Disallow firing staff who are currently fixing or inspecting rides

* Disable fire button when staff member is inspecting/fixing a ride

* Add changelog entry

* Up network version

* Improve error message

---------

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2023-05-21 18:36:08 +02:00
AuraSpecs 870c78001e
Add new roller coaster ride colour presets (#20119)
* Fix G2 order and format

PR #19446 did not follow the correct G2 order so this is fixing that.

Also adds the added icons to the [Plugin] chart as should when adding icons to G2.

* Add colour documentation

* Joker's Jinx colour

For the LIM Launched, based on Premier rides LIM RC.

* Poltergeist colour

Based on a Premier rides LIM RC

* Flight of Fear colour

* Add Mega-Lite colour scheme

* Add colours for Vertical Drop RC

* Add two HyperCoaster presets

Suggested by Kyphii

* Add Mako colour scheme

Suggestion by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add two colours to BM Invert

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Bobsleigh Preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Woodie Presets

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Looping RC preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Flying RC preset

Not based on one specifically, it just looks very nice.

* Update GCI Woodie preset

* Update Inverted RC's presets

Removed the skinworm and added a banshee colour scheme that you could find in the renders. Supports were a tad difficult but I think Violet pops the best with the rails so I decided to go for that.

* Change default Woodie LB Bl Bl to LB Bl DB

* Update ride presets for Twister RC

Removed Aquamarine and Moss Green because you can find Moss Green on the Flying already and Aquamarine is very close to the white.

The white I would probably change to Black & White and move it to the Wing RC once that ride type becomes available.

* Add colour presets for the 4th Dimension RC

* Add Hybrid RC presets

* Add two yellow themes for Impulse

May both rides rest in pieces

* Add colour documentation

* Joker's Jinx colour

For the LIM Launched, based on Premier rides LIM RC.

* Poltergeist colour

Based on a Premier rides LIM RC

* Flight of Fear colour

* Add Mega-Lite colour scheme

* Add colours for Vertical Drop RC

* Add two HyperCoaster presets

Suggested by Kyphii

* Add Mako colour scheme

Suggestion by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add two colours to BM Invert

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Bobsleigh Preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Woodie Presets

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Looping RC preset

Suggested by Kyphii

Co-Authored-By: kyphii <8711258+kyphii@users.noreply.github.com>

* Add Flying RC preset

Not based on one specifically, it just looks very nice.

* Update GCI Woodie preset

* Update Inverted RC's presets

Removed the skinworm and added a banshee colour scheme that you could find in the renders. Supports were a tad difficult but I think Violet pops the best with the rails so I decided to go for that.

* Change default Woodie LB Bl Bl to LB Bl DB

* Update ride presets for Twister RC

Removed Aquamarine and Moss Green because you can find Moss Green on the Flying already and Aquamarine is very close to the white.

The white I would probably change to Black & White and move it to the Wing RC once that ride type becomes available.

* Add colour presets for the 4th Dimension RC

* Add Hybrid RC presets

* Add two yellow themes for Impulse

May both rides rest in pieces

* Add changelog entry

* Add Water Coaster colour preset

---------

Co-authored-by: kyphii <8711258+kyphii@users.noreply.github.com>
Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2023-05-21 18:02:28 +02:00
Matthias Moninger a1d30b6db0
Revert audio changes (#20259)
* Revert audio changes

* Revert changelog.txt
2023-05-21 16:47:20 +02:00
Michael Steenbeek 1f5e9ac285
Clean up path additions entry index handling (#20177)
* Clean up path additions entry index handling

* Bump network version
2023-05-20 09:33:02 +01:00
Rik Smeets 5b117ce910
Merge pull request #20078 from Gymnasiast/refactor/laydown-coaster
Cleanup uninverted Laydown RC code
2023-05-19 10:26:40 +02:00
LurkerRCT 946e57b7dd
Add Side Friction Roller Coaster colour preset (#20243)
* Update SideFrictionRollerCoaster.h

* Update changelog.txt

* Update src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>

* Update distribution/changelog.txt

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

---------

Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2023-05-19 08:19:03 +00:00
Michael Steenbeek 5e495d63c7
Close #15660: Allow showing window buttons on the left (#20176) 2023-05-19 10:17:38 +02:00
Matthias Moninger 551a68138e
Merge pull request #20233 from ZehMatt/fix-tooltips
Fix tool tips disappearing too quickly
2023-05-18 20:01:45 +03:00
ζeh Matt bdbb9023da
Fix tool tips disappearing too quickly 2023-05-18 18:08:16 +03:00
ζeh Matt a51d8066bf
Fix #20223: Reduce amount of audio samples to 256 to avoid high latency 2023-05-18 17:22:11 +03:00
Bart Ribbers 053c00218f
Fix int32_t being undefined on Musl systems due to missing import (#20231) 2023-05-18 14:16:59 +01:00
Matthias Moninger 6bd5f75330
Update the UI at screen refresh rate (#20214)
* Update the UI at screen refresh rate

* Decouple input from ticks, fix scroll at high frame rates

* Fix holding down mouse button on buttons causing too many events

* Subtract the initial delay to keep the same behavior as before

* Guard against the rare case where the value might be 0

* Fix right click not working correctly

* Fix odd behavior when using right click to scroll lists

* Make touch work again, fix mouse panning in fullscreen (borderless)

* Update changelog.txt
2023-05-17 19:19:44 +00:00
kyphii 0b18bc0923
Fix #20111: All coaster types can access the new diagonal slope pieces (#20150)
* Fix access to diagonal slopes and turns

* Add changelog entry

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-05-17 19:42:09 +01:00
spacek531 4507d3e5c4
fix restraints with 8 angles (#20197) 2023-05-17 19:41:23 +01:00
Michael Steenbeek 4a79af7b20
Use strong enum for ViewportSetVisibility (#20230) 2023-05-17 19:27:22 +01:00
Michael Steenbeek fe2d1e2372
Small symbol cleanup (#20229)
* Remove unused generate_string_file() declaration

* Move IsUserStringID() to RCT12.h

The function is only used by RCT1/2 code, and the implementation is in RCT12.cpp

* Move ScenarioTranslate() to ScenarioRepository.cpp

Seems to have ended up in ObjectRepository.cpp by accident.
2023-05-17 19:27:04 +01:00
Hielke Morsink 27e06ef7b7
Fix naming collision 2023-05-15 21:30:06 +02:00
Hielke Morsink fd3346b4b3
Fix: items after the removed RCT1 theme have wrong index 2023-05-15 21:13:47 +02:00
Hielke Morsink edd31163b0 Refactor GetTitleMusicDescriptor back to one function 2023-05-15 19:26:49 +01:00
Hielke Morsink 0a8c804347 Make the OpenRCT2 theme song the default 2023-05-15 19:26:49 +01:00
Karst 6d84a0681e Add about info 2023-05-15 19:25:00 +01:00
Karst 674443d075 Add OpenRCT2 official title music
Co-Authored-By: Ted John <intelorca@gmail.com>
2023-05-15 19:24:10 +01:00
AuraSpecs ed402ccef1
Upgrade sound engine to support 44100hz sample rate (#20200)
* Upgrade sound engine to support 44100hz.
* Increase audio output buffer size to 4096.
2023-05-15 18:42:15 +01:00
Duncan db1c9fab41
Fix #19823. Disallow overriding with wrong object type (#20182)
* Fix #19823. Disallow overriding with wrong object type

Some community objects have been made incorrectly and override small scenery objects with large scenery objects. This prevents that overload from being allowed.

* Bump network version and add changelog
2023-05-14 20:31:06 +00:00
Silent c4b70358c8
More MAX_PATH removals (#20113)
* Refactor FileScanner to lift a MAX_PATH limit

* Replace Platform::EnsureDirectoryExists with Path::CreateDirectory

* Remove MAX_PATH from Platform.Posix.cpp
2023-05-09 20:08:46 +01:00
Michael Steenbeek 58baa85a27
Small path additions cleanup (#20076)
* Split off path addition paint calls

* Replace occurences of “path bit” with “path addition”

* Replace occurences of “footpath item“ with “path addition”
2023-05-09 20:08:25 +01:00
ZeeMajora 7118249715 Fix a few RCT1 build height discrepancies 2023-05-08 10:26:31 -04:00
Michał Janiszewski 76ca8400ca Release v0.4.5
- Feature: [#18713] Block brakes have speed control and brakes slower than adjacent block brakes copy block brake speed when block brake open.
- Feature: [#19276] Add Powered Lifthill to Giga Coaster.
- Feature: [#19305] Add new Reversed Trains ride setting to run trains backwards, granting a bonus to ride ratings.
- Feature: [#19305] [Plugin] Add “Car.isReversed” to allow individual ride vehicles to run backwards.
- Feature: [#19446] Add new color options to color dropdown.
- Feature: [#19547] Add large sloped turns to hybrid coaster and single rail coaster.
- Feature: [#19930] Add plugin APIs for research.
- Feature: [OpenMusic#25] Added Prehistoric ride music style.
- Feature: [OpenMusic#26] Fairground Organ style 2 with new recordings from Herman's 35er Voigt (Previously known as Bressingham Voigt).
- Feature: [OpenMusic#28] Add Ragtime style 2 ride music.
- Improved: [#17739] Raise water and land height limits to 254 units/182m/600ft.
- Improved: [#18490] Reduce guests walking through trains on level crossing next to station.
- Improved: [#18996] When marketing campaigns are disabled, disable the Marketing tab in the Finances window.
- Improved: [#19764] Miscellaneous scenery tab now grouped next to the all-scenery tab.
- Improved: [#19830] “Highlight path issues” will now hide wall elements.
- Improved: [#19905] Add prompt before resetting shortcut keys.
- Improved: [#19952] Add colour preset to Spiral Slide using the new colour options.
- Improved: [#19953] Add keyboard shortcut to Keyboard Shortcuts window.
- Improved: [#20055] Performance improvement for the software renderer.
- Change: [OpenSFX#17] Update Hybrid RC lifthill loop.
- Fix: [#12598] Number of holes is not set correctly when saving track designs.
- Fix: [#13130] Android always defaulting to UK locale for language, currency and temperature.
- Fix: [#13397] Ride simulation causes strange station behaviour and makes the ride unusable in some cases.
- Fix: [#16791] Rotodrop top piece replicates when walls are placed around it and clearance checks are disabled (original bug).
- Fix: [#18583] Land dropdown is incorrect if there are surface entry index holes.
- Fix: [#18895] Responding mechanic blocked at level crossing.
- Fix: [#19231] Crash due to null pointer to previously deleted banner in tile copy/paste functionality.
- Fix: [#19296] Crash due to a race condition for parallel object loading.
- Fix: [#19733] Favorite ride of X guests integer overflow.
- Fix: [#19756] Crash with title sequences containing no commands.
- Fix: [#19767] No message when path is not connected to ride exit and is therefore unreachable for mechanics.
- Fix: [#19800] Crash when displaying station stats with more than 62 stations.
- Fix: [#19801] The in-game load/save window cannot be resized anymore.
- Fix: [#19854] Looping Coaster trains clipping through steep quarter turns down.
- Fix: [#19858] Issue drawing simulate flag icon on alternate colour palettes.
- Fix: [#19901] Random shop colours never assigning last colour.
- Fix: [#19911] Guests stuck at certain railway crossings.
- Fix: [#19924] Destructible cheat does not allow partial ride modification.
- Fix: [#19950] Mine train block brake supports drawn incorrectly.
- Fix: [#19955] Mine Train Roller Coaster has incorrect supports on the sloped left small turn (original bug).
- Fix: [#19987] [Plugin] ‘SetCheatAction’ has wrong ID in plugin API.
- Fix: [#20016] The group box for small scenery details in the Tile Inspector window has unused empty space.
- Fix: [#20018] Shops not calculating up-keep cost.
- Fix: [#20033] Asset packs cannot reference game data.
- Fix: [#20104] [Plugin] Some network APIs use player index and group index.
- Fix: [#20099] Some scrollbar is glitched or have incorrect size when open window for the first time
- Fix: [#20134] Grass length being updated for tiles in the void, causing unneccesary drawing operations.
2023-05-08 13:02:02 +02:00
Michał Janiszewski f1c79f6ac4
Iterate widgets only until last (#20116) 2023-05-07 20:37:06 +00:00
Michał Janiszewski 0871525850
Use precompiled headers for libopenrct2 with MSVC (#15997)
* Use precompiled headers for libopenrct2 with MSVC

* Exclude PCH from duktape

duktape needs all the warnings turned off and forcing PCH also enables
warnings. As there is nothing duktape would consume from our header,
remove forcing inclusion of that header into duktape.

* Provide msbuild parameter for using PCH only in CI
2023-05-07 21:53:50 +02:00
Matthias Moninger 4afa56e373
Merge pull request #20143 from janisozaur/gcc-13.1
Fix compatibility with GCC 13.1
2023-05-07 22:09:17 +03:00
Michał Janiszewski 6f2bf26ce1 Do the seekg thing 2023-05-07 20:46:05 +02:00
Michał Janiszewski 01f32a660f Fix length calculation 2023-05-07 20:00:37 +02:00
Matthias Moninger 4cb5620f43
Fix #20145: Add missing OnRidePhoto to the special element table (#20147) 2023-05-07 19:52:11 +02:00
Michał Janiszewski 851632510f Use unique_ptr 2023-05-07 19:37:56 +02:00
spacek531 61d820e614
Refactor special track elements list part 2 (#19951)
Part 2 of #19922
Fixes #19964

There are a lot of files changed, so this PR is structured to be easy to follow by looking at individual commits.

This PR refactors how the special track element list is created. The refactors include:

Divorces creating the list from RideConstructionWindow for modularity, including potential plugin API
Adds list of special track elements which can be re-ordered for more sensible organization
Same-named track elements will collapse into as few entries as possible
Separates up helixes from down helixes in track flags
Track flag separation was done to remove special code related to alpine coaster. Refactors to ride construction window were tested against and confirmed working with:

alpine coaster
suspended swinging coaster
hybrid coaster
inverted coaster
2023-05-07 09:13:22 +00:00
Michał Janiszewski be145da783 Fix compatibility with GCC 13.1 2023-05-06 23:02:26 +02:00
ζeh Matt 5683cf9520
Bump up network version 2023-05-06 18:25:27 +03:00
ζeh Matt 4c78c8e512
Remove pointless masking 2023-05-06 18:25:27 +03:00
ζeh Matt cc1eee5bee
Fix #20134: Don't update grass length outside of the actual map 2023-05-06 18:25:27 +03:00
Meehoi 936f017147
Fix #20096: Server list window scroll is glitched when server list is empty (#20099)
* Fix initial scroll size of server list and change cast to int32_t

* set actual width for server list too

* add indentation

* fix pixel size of other scroll

* revert unnecessary changes

* add changelog entry
2023-05-06 17:01:14 +03:00
Jochen Löppenberg 8627a5875f
Fix #20007: Wrong Error message when raising land or water: "Too low!" (#20123) 2023-05-06 12:23:17 +00:00
kyphii 6f55454ae8
Add ratings modifier for reversed trains (#20091)
* Add ratings modifier for reversed trains

* Add test save file and ratings for this

* Changelog entry

* Bump network version

* Modify changelog

* Changelog edit

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-05-06 02:40:41 +03:00
Matthias Moninger e9c480c66e
Fix #20121: Guard against nullptr on viewport scroll (#20122) 2023-05-03 20:15:02 +01:00
Ted John 79f8913065 Fix CI due to sign issue 2023-05-02 20:28:14 +01:00
Ted John 0ed4bfbc4a Return null for legacyIdentifier 2023-05-02 20:28:14 +01:00
Ted John cbd4c78cf6 Handle legacy objects correctly 2023-05-02 20:28:14 +01:00
Ted John 069a2b3192 Implement object manager for plugins 2023-05-02 20:28:14 +01:00
Ted John f95472c70a Add API for installed objects 2023-05-02 20:28:14 +01:00
Ted John f1ac4363ce Fix openrct2.d.ts 2023-05-02 20:28:14 +01:00
Ted John d3a65443f2 Increment plugin API version 2023-05-02 20:28:14 +01:00
Ted John 58dc3f193b Use simple identifiers 2023-05-02 20:27:57 +01:00
Ted John bf3c6964be Remove scenery from object type names 2023-05-02 20:27:56 +01:00
Ted John 74fc4d3666 Revert re order of small scenery function 2023-05-02 20:27:56 +01:00
Ted John 1a73a0be68 Implement other scenery objects 2023-05-02 20:27:56 +01:00
Ted John 2729956cef Add scenery group object interface 2023-05-02 20:27:56 +01:00
Ted John 530dfac7c9
Fix #20104: [Plugin] Some network APIs use player index and group index (#20115)
Change all APIs that took a player index or group index so that they now take unique IDs.
2023-05-02 15:25:05 +01:00
Michał Janiszewski 42fa4cb6b9
Update backtrace token (#20117) 2023-05-01 23:03:30 +02:00
kyphii fe219281ec
Refactor Ride Ratings 2023-04-29 22:03:25 +02:00
kyphii 4237a02105
Fix mine train diagonal piece drawing incorrectly (#20082)
Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-29 07:41:49 +01:00
Tom c2042d541a
Refactor window to class: Research (#19910)
* Refactor window to class: Research (#13794)

- Update Research window to new window class

- Refactor dependant windows (Finances and NewRides)

* Refactor window to class: Research (#13794)

- Refactor all shared logic for both pages in research window. Reused by Finances and NewRides windows.

* Refactor window to class: Research (#13794)

- Fix style issues

* Refactor window to class: Research

- Fix style issues, again

* Refactor window to class: Research

- Override Window class methods

* Refactor window to class: Research

- Remove old method comments

* Refactor window to class: Research

- Addresses code review comments

* Refactor window to class: Research

- Adds ResearchWindow ctor

* Refactor window to class: Research

- Hide funding dropdown in no money scenarios
- Addresses code review comments
2023-04-28 23:54:02 -03:00
Gymnasiast 83612a98e1
Move all other uninverted Lay-down coaster parts to Corkscrew 2023-04-29 00:21:15 +02:00
Gymnasiast 6281e8b603
Use Corkscrew RC for 46 other Lay-down track elements 2023-04-29 00:21:14 +02:00
Gymnasiast a534a94286
Use Corkscrew RC for 16 Lay-down track elements 2023-04-29 00:21:14 +02:00
Matthias Moninger 79af072cf4
Merge pull request #20055 from ZehMatt/dirty-grid
Improve dirty grid rendering performance.
2023-04-27 18:16:33 +03:00
spacek531 1bbdba40b5
Implement paint code for spiral lifthill down (#19567)
* spiral lifthill down paintcode

* rename string anyway

* add some stuff I forgot and add documentation

* use static assert on SpriteGroupMultiplier

* add slope to list of opposite slopes

* bump scripting version

* update openrct2.d.ts

* improve documentation
2023-04-27 15:11:22 +01:00
Tulio Leao c849a75bc8
Close #13782: Refactor Multiplayer window to class (#19948) 2023-04-27 07:05:14 -03:00
ζeh Matt d6b340b34d
Fix comments 2023-04-26 21:58:44 +03:00
ζeh Matt 5439c7ffeb
Improve dirty grid rendering performance. 2023-04-26 18:37:00 +03:00
Chase d6ebeca483
Fix #19935: Part of old multiplayer name remains when entering a shorter name (#20004)
* clear _playerName

* Change _playerName to a u8string

* Explicitly set underlying string ptr on change
2023-04-26 08:34:39 +01:00
Michael Steenbeek c96762517f
Use strong enum for metal supports (#20045) 2023-04-24 21:46:33 -03:00
Duncan ee100f59c0
Fix #19800. Crash when more than 62 stations on a ride (#20039)
* Fix #19800. Crash when more than 62 stations on a ride

This is a bit of a temporary fix. The crash happens due to exhausting the space in the formatter but the format string only ever handled 4 stations so it was still not going to work for 5 <=> 62 stations. So for the time being capped the output at 4 stations.

* Add changelog entry

* Apply review comment
2023-04-24 21:16:21 +00:00
Ted John 9dac7f889f
Fix #18583: Land dropdown is incorrect if there are surface entry holes (#20035) 2023-04-24 22:00:12 +01:00
Ted John 0cf24f0100
Fix #20033: Asset packs cannot reference game data (#20034) 2023-04-24 21:55:36 +01:00
Michael Steenbeek 2f25d4054b
Refactor/wooden supports 2 (#20005)
* Use new enum in MiniatureRailway.cpp

* Add new paint functions for Wooden B supports

* Update and consolidate Wooden B supports calls for Minetrain RC

* Consolidate Wooden A supports calls for Minetrain RC

* Replace some unnecessary calls to PaintAddImageAsParentRotated()
2023-04-24 21:54:16 +01:00
kyphii c74e69b8a0
Fix #20027: Looping coaster with the reverse train option makes the wrong sound (#20028)
* Always use carEntry 0 for friction sound

* Use front car entry for sound index

* Add note for carEntry sound properties

* Bump network version

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-24 08:03:01 +01:00
Matthias Moninger 21a0ccbb77
Merge pull request #20024 from ZehMatt/fix-20018
Fix #20018: Shops not calculating up-keep cost
2023-04-23 01:29:37 +03:00
ζeh Matt aa00f1768b
Bump up network version 2023-04-23 00:16:04 +03:00
Matthias Moninger c0abafb4cc
Merge pull request #20023 from Broxzier/bugfix/20008-roto-drop-paint-crash
Fix #20008: Crash in PaintRotoDropTowerSection
2023-04-22 23:10:07 +03:00
ζeh Matt 4dbe3fa5d7
Fix #20018: Shops not calculating up-keep cost 2023-04-22 22:56:59 +03:00
Hielke Morsink 5ade3e704c
Fix #20008: Crash in PaintRotoDropTowerSection 2023-04-22 21:52:06 +02:00
kyphii 9ca4e48c79
Fix: #13397: Broken Stations with Simulate Mode 2023-04-22 19:41:26 +02:00
Hielke Morsink c88fe4d2d2
Fix: small scenery details group box is unnecessarily big (#20016)
Small mistake from d46f981f03 that I only noticed just now.
2023-04-22 14:31:03 +02:00
Duncan cdccb21dd5
Refactor of colours (#19998)
* Move dropdown functions to dropdown code

* Use a map for the colour tip

* Keep dropdownidx and colour seperated

* Allow number of rows to match vanilla

* Apply review comment

* Bump network version
2023-04-22 08:58:13 +00:00
Ted John 713bb09990
Merge pull request #19930 from IntelOrca/plugin/research
Add research plugin API
2023-04-21 21:17:34 +01:00
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
Wenzhao Qiu 8f0db4cb20
Fix #16791: rotodrop top piece is replicated (#19970)
* Fix rotodrop top piece replication issue (#16791)

* Add changelog entry

* Raise network version

* Move changelog entry
2023-04-21 09:48:17 -03:00
Michał Janiszewski 784237202b
Raise water and land height limits to 254 units/182m/600ft (#19988)
* Raise water and land height limits to 254 units/182m/600ft

New parks load correctly in older versions, but cannot be altered there.

Fixes #17739

* Add changelog, bump network and park file version
2023-04-21 12:58:39 +02:00
Matthias Moninger 698a06121f
Merge pull request #19975 from Broxzier/bugfix/issue-form-fields
Fix: version info is not filled on bug report
2023-04-21 00:45:26 +03:00
Ted John e820956a59 Move research API to .cpp file 2023-04-20 22:09:23 +01:00
Duncan be30930b4a
Merge pull request #19955 from Gymnasiast/refactor/wooden-supports
Introduce normalised Wooden A supports functions
2023-04-20 19:14:12 +01:00
Rik Smeets d10be6d0e7
Fix #19911: Guests stuck at railway crossings (#19939)
In continuous circuit operating mode, not only the train head should be used for (un)blocking path. Because of this change, a previous change regarding which trailing track blocks should be unblocked has been reverted, as to prevent path being unblocked too soon.
2023-04-20 18:53:21 +02:00
Gymnasiast 33bd5c494f
Introduce normalised Wooden A supports functions 2023-04-20 18:35:58 +02:00
Matthias Moninger e614584f65
Fix #19991: Crash when using cut-away view (#19968)
* Fix #19991: Crash using cut-away view

* Update changelog.txt

* Document the use of temporary paint head
2023-04-20 16:00:22 +01:00
Gymnasiast 809e172a84
Fix Mine Train support bug (original bug) 2023-04-19 16:22:08 +02:00
Matthias Moninger 98aa816e5f
Fix #19989: Crash with small scenery objects having no offsets defined (#19990) 2023-04-19 06:35:09 +01:00
Ted John d471d7a4b7 Use strings for research category 2023-04-18 21:38:10 +01:00
Ted John 83bf0d7dce Make expectedDay in plugin in 1 to 31 range. 2023-04-18 21:38:10 +01:00
Ted John 00eb2aae95 Move uninvented item to invented list when research is complete
When an item began initial research, it was moved to the invented list. This is not intuitive for plugins, so move it once the item is fully researched.
2023-04-18 21:38:10 +01:00
Ted John fe3f32e82e Fix code review comments on research 2023-04-18 21:38:10 +01:00
Ted John aa3f8957bd Use enum for research item category 2023-04-18 21:38:10 +01:00
Ted John f35e595d0e Add research plugin API 2023-04-18 21:38:09 +01:00
Stephan Spengler 2fd3eb47e7
SetCheatAction has wrong ID in plugin API 2023-04-18 13:23:44 +02:00