Skip to content

Conversation

@IntelOrca
Copy link
Contributor

The map size game action has changed to allow for both width and height to be specified.
This means, plugin API is increased, and any plugins using the map size change action must be updated.
The network version has changed.

Currently the UI has not been changed, so the only way to access rectangle maps right now is to use scripting and invoke the game action with your own width and height.

@IntelOrca IntelOrca force-pushed the refactor/rectangle-maps branch from 98e0cf0 to 7a84322 Compare December 18, 2021 14:50
@ZehMatt ZehMatt added the network version Network version needs updating - double check before merging! label Dec 30, 2021
@ZehMatt ZehMatt added this to the v0.4.0 milestone Dec 30, 2021
@IntelOrca IntelOrca force-pushed the refactor/rectangle-maps branch from d8c2abe to 1e266aa Compare January 11, 2022 20:02
@IntelOrca IntelOrca requested a review from Gymnasiast January 17, 2022 21:35
if (customLocation)
{
if (centreMapX)
customX = (mapSize / 2) * 32 + 16;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customX/customY should be refactored in another PR (making a note so that I don’t forget).


if (!LocationValid(_location) || _location.x <= 16 || _location.y <= 16 || _location.x >= (GetMapSizeUnits() - 16)
|| _location.y >= (GetMapSizeUnits() - 16))
auto mapSizeUnits = GetMapSizeUnits() - CoordsXY{ 16, 16 };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a constant for 16 too, I think. Something like HALF_TILE. But this can be done in another PR too.

@Gymnasiast
Copy link
Member

Getting there, found 1 possible mistake and a few code style/quality things.

@IntelOrca IntelOrca requested a review from Gymnasiast February 9, 2022 20:49
@IntelOrca IntelOrca force-pushed the refactor/rectangle-maps branch from 48b8ced to c409faf Compare February 13, 2022 23:09
@IntelOrca IntelOrca force-pushed the refactor/rectangle-maps branch from c409faf to 4429411 Compare February 14, 2022 23:20
@IntelOrca IntelOrca requested a review from Gymnasiast February 14, 2022 23:20
@IntelOrca IntelOrca merged commit 6c3a417 into OpenRCT2:develop Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network version Network version needs updating - double check before merging!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants