Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #8020: Add missing docking tiles around industry neutral stations #8021

Merged

Conversation

SamuXarick
Copy link
Contributor

No description provided.

@SamuXarick SamuXarick force-pushed the oil-rig-station-missing-docking-tiles branch from c95ba12 to 930ffc6 Compare February 24, 2020 22:52
@LordAro
Copy link
Member

LordAro commented Feb 24, 2020

I'm not seeing why a savegame bump is necessary here

@glx22
Copy link
Contributor

glx22 commented Feb 24, 2020

It's to fix "broken" saves since SLV_MULTITILE_DOCKS

@@ -3123,6 +3123,12 @@ bool AfterLoadGame()
}
}

if (IsSavegameVersionBefore(SLV_FIX_NEUTRAL_STATION_DOCKING_TILE)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (IsSavegameVersionBefore(SLV_FIX_NEUTRAL_STATION_DOCKING_TILE)) {
if (IsSavegameVersionBefore(SLV_FIX_NEUTRAL_STATION_DOCKING_TILE) && !IsSavegameVersionBefore(SLV_MULTITILE_DOCKS)) {

to not iterate all stations twice, as now the original IsSavegameVersionBefore(SLV_MULTITILE_DOCKS) block above this fix will be correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

Other option is to extract the iteration from IsSavegameVersionBefore(SLV_MULTITILE_DOCKS) block and run it unconditionally like AfterLoadRoadStops(), removing the need for the savegame bump

@SamuXarick SamuXarick force-pushed the oil-rig-station-missing-docking-tiles branch from 930ffc6 to 329c40c Compare February 25, 2020 10:52
@SamuXarick SamuXarick force-pushed the oil-rig-station-missing-docking-tiles branch from 329c40c to ae95ed3 Compare February 25, 2020 10:54
@glx22 glx22 added the backport requested This PR should be backport to current release (RC / stable) label Mar 3, 2020
@LordAro
Copy link
Member

LordAro commented Mar 6, 2020

I'm prepared to say that the few missing tiles don't matter for savegames created between SLV_MULTIDOCK_TILES and now. There's not been a (stable) release between then anyway

@nielsmh
Copy link
Contributor

nielsmh commented Mar 6, 2020

Agree with @LordAro here, a bump is not strictly necessary. The missing tiles mean some water industries won't have ships docking in all positions but it's not a game-breaking catastrophe.
On the contrary, a savegame bump will prevent the fix from being backported to 1.10 release, since the savegame version should be frozen in release branches.

@nielsmh nielsmh merged commit 57553cd into OpenTTD:master Mar 30, 2020
@LordAro LordAro added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels Mar 31, 2020
glx22 added a commit to glx22/OpenTTD that referenced this pull request May 6, 2020
glx22 added a commit to glx22/OpenTTD that referenced this pull request May 6, 2020
glx22 added a commit to glx22/OpenTTD that referenced this pull request May 6, 2020
LordAro pushed a commit to LordAro/OpenTTD that referenced this pull request May 10, 2020
@SamuXarick SamuXarick deleted the oil-rig-station-missing-docking-tiles branch December 19, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants