Commit Graph
206 Commits
Author SHA1 Message Date
Ted John a2f7ffcb71 Merge pull request #16707 from IntelOrca/plugin/intransient-2
Add initial functionality for intransient plugins. Intransient plugins are a new type of plugin that will start when OpenRCT2 launches, and remain loaded until shutdown. This provides plugins with the ability to hook map change and provide functionality on other screens such as the title menu.

**Example:**
```js
registerPlugin({
    type: 'intransient',
   ...
});
```

The [title sequence editor](https://github.com/OpenRCT2/title-sequence-editor) will be an intransient plugin so that it can be used from the title screen like the built in one.

Three new APIs have been introduced alongside this.
* `context.mode`
* `context.subscribe('map.change', callback)`
* `context.subscribe('map.changed', callback)`
* `ui.registerToolboxMenuItem(text, callback)`
2022-03-22 21:48:26 +00:00
alcz 45369e3497 Fix #16565: Ducks/birds always spawn at the edge of the old map limit (#16844)
* Fix #16565: Ducks/birds always spawn at the edge of the old map limits

Fix #16565: birds/ducks spawning at fixed 255-sized map boundary.

Instead spawn at actual map boundary (MapSizeMaxXY) where applicable

* Update Network Version

Increments network version
2022-03-22 16:49:54 +00:00
Ted John 9f96b0df33 Separate map.change and map.changed events
Also fix network plugin logic.
2022-03-21 23:09:40 +00:00
Ted John 84fdd44e6a Add map changed hook 2022-03-21 21:42:30 +00:00
Gymnasiast ffe8b4b45d Undo fspath() workaround for Android 2022-03-18 23:21:23 +01:00
Duncan d266743083 Fix #16808: Incorrect serialisation of track design object (#16817) 2022-03-18 07:10:19 -03:00
Charles Machalow bb5d53d9f2 Fix crash where peeps enter through extra ride entrances (#16727)
Fix #16170, #16177
2022-03-15 06:39:13 +00:00
Silent 5e725913f8 Close #16566: Favour WinNT preprocessor version checks over MinGW (#16677) 2022-03-11 07:59:09 -03:00
Michael Steenbeek 9b1c915f4d Merge pull request #16744 from Basssiiie/fix-unlimited-vehicles-defaults
Fix “Disable vehicle limits” cheat giving all new rides 32 trains with 12 cars
2022-03-09 13:03:14 +01:00
Ted John b7b8816db7 Add plugin hook for map save 2022-03-07 21:40:48 +01:00
Bas d239529a73 Fix “Disable vehicle limits” cheat giving all new rides 32 trains 2022-03-03 22:26:33 +01:00
Hielke Morsink 6ba0a3bd49 Use u8 strings when dealing with file paths 2022-03-01 22:12:39 +01:00
Hielke Morsink 55c71b0c74 Properly use utf8 strings where expected 2022-03-01 22:12:39 +01:00
Ted John f2117508c4 Fix #15413: Modifying park rating with plugins desyncs history (#16672)
Update park rating history before park rating.
2022-02-23 13:07:04 +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
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Ted John 6d337a15c4 Increment network version 2022-02-14 23:16:47 +00:00
duncanspumpkin 4d341c8518 Update network version 2022-02-14 12:32:14 +00:00
Gymnasiast 9441d4b24f Bump network version 2022-02-13 21:11:18 +01:00
skdltmxn 29083f4cb2 Improve network module in more C++ way 2022-02-09 21:57:25 +01:00
ζeh Matt 19dca61ee8 Fix #16535: Entering construction mode unblocks all paths 2022-01-31 23:05:26 +01:00
ζeh Matt 41e8146465 Bump up network version 2022-01-29 17:09:05 +02:00
Michael Steenbeek f43a4344ce Remove platform_get_user_directory() (#16530) 2022-01-29 09:01:05 -03:00
Gymnasiast f8c74fe2f8 Use u8string in Path/File; replace Path::Append with Path::Combine 2022-01-28 21:52:44 +01:00
Michael Steenbeek 149b164ee8 Use u8string for custom paths 2022-01-27 14:21:46 +01:00
Michael Steenbeek d97ecdd981 Fix #13336: Can no longer place Bumble Bee track design 2022-01-20 10:56:27 +01:00
duncanspumpkin 81b490b0bc Fix #16276. Paths on trackdesigns not connecting on placement 2022-01-15 07:11:07 +00:00
Michael Steenbeek 939ddb4813 Merge pull request #16399 from Gymnasiast/refactor/more-platform-functions-2
C++-ify most path handling
2022-01-09 13:29:54 +01:00
GalBrandTulio Leao 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
Gymnasiast 6bcf848b2f Use C++ filesystem for more file/path functions 2022-01-08 19:07:48 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
ζeh Matt b89eddc867 Fix #16327: Crash supplying a bad signature size in the auth packet 2021-12-28 16:44:21 +02:00
Gal B 10bd0e7189 Increment NETWORK_STREAM_VERSION 2021-12-22 18:48:37 +02:00
duncanspumpkin 7e7947fe8b Move legacy identifier interpreting to separate file from parkfile 2021-12-15 21:29:02 +00: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
Duncan 3deaa1af2e Fix #16197: Park award time and type accidentally swapped 2021-12-12 11:20:17 +01:00
ceb49e0984 Fix: #16162 Go Kart speeds not correctly randomised (#16165)
* Fix Go Kart Speeds not being random

Go kart speeds now only get 2 different values (around 37kmh or around 25kmh), in vanilla Go karts can also have a value in between. This PR fixes that.

* Update changelog.txt

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

* Increment network version

* Update replays

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-12-11 17:11:23 +00:00
Duncan 56c4240d77 Make Parkfile Pathfinding Deterministic (#16147)
* Rename path find functions and use sub function

* Modify leaving park logic to not use park entrance index

* Remove ChosenParkEntrance from peep struct

* Refactor GetNearestParkEntrance

Removed the index as its pointless. Fixed function to use CoordsXY

* Increment network version

* Update replays
2021-12-11 16:03:59 +00:00
Duncan fdfd9b4760 Make track designs NSF map size safe (#16116)
* Make track designs NSF map size safe

* Increment network version
2021-12-06 16:58:50 +00:00
ζeh Matt 56e78d5733 Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
Duncan 2b4eaab5dc Modify TrackPlaceAction to handle ride type parameter (#15980)
* Modify TrackPlaceAction to handle ride type parameter

* Update network and plugin version

* Update replays
2021-11-25 12:28:30 +00:00
ζeh Matt 03fb9b390f Rename Sprite to EntityRegistry 2021-11-24 17:04:12 +02:00
ζeh Matt 7c726e2a0c Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt c6242fd310 More renaming 2021-11-24 15:50:18 +02:00
ζeh Matt 83b911b193 #15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00:00
YJSoft fcf587dfa4 Fix #15974 Cannot download object from server (#15975)
Due to some leftover code from NSF rebase, server will parse MAPREQUEST incorrectly. so client will fail to download objects.
2021-11-23 08:36:37 +00:00
Michał Janiszewski 3ff2466251 Update network version for NSF (#15950) 2021-11-21 23:39:41 +00:00
34128dc262 Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Gymnasiast 61c67afc66 Release v0.3.5.1
- Improved: [#12825, #12869] The Tile Inspector window’s layout has been tweaked slightly.
- Change: [#15899] Weird bonus for path 0 - likely intended as a queue bonus (original bug).
- Fix: [#15138] Sometimes small scenery stays when building through it.
- Fix: [#15620] Placing track designs at locations blocked by anything results in wrong error message.
- Fix: [#15843] Tile Inspector can be resized too small.
- Fix: [#15844] Tile Inspector has inconsistent text colours.
- Fix: [#15878] Crash when opening a ride window for a corrupted vehicle.
- Fix: [#15908] Crash when track elements have no ride assigned.
- Fix: [#15919] Research status incorrectly considered for scenery when in editor modes.
- Fix: [#15938] Track designs of some ride types are incorrectly exported to TD6.
2021-11-21 22:06:59 +01:00
ζeh Matt c0f928f51d Merge pull request #15895 from ZehMatt/refactor/gamecommands
Remove unnecessary game command ids
2021-11-13 08:21:40 -08:00