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 #9591: Update station docking tiles upon placing a water object on a docking tile #9594

Merged

Conversation

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Oct 2, 2021

Motivation / Problem

Placing a water object on a docking tile doesn't run CMD_LANDSCAPE_CLEAR which calls ClearTile_Water to do the removal of docking tiles.

Description

Borrow some part of the code from ClearTile_Water that deals with the removal of docking tiles and use it during object construction.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
Copy link
Contributor

@glx22 glx22 left a comment

Seems correct, but I think a savegame bump is needed, and an update of https://github.com/OpenTTD/OpenTTD/blob/master/src/saveload/afterload.cpp#L3109 with the new version.

Loading

@SamuXarick SamuXarick force-pushed the remove-docking-tile-on-placing-object branch 2 times, most recently from 606eba0 to f122756 Oct 2, 2021
src/saveload/afterload.cpp Outdated Show resolved Hide resolved
Loading
@SamuXarick SamuXarick force-pushed the remove-docking-tile-on-placing-object branch from f122756 to 25be496 Oct 3, 2021
src/object_cmd.cpp Show resolved Hide resolved
Loading
Copy link
Member

@TrueBrain TrueBrain left a comment

@glx22 and @LordAro seems to think this is correct, so lets go!

Loading

@TrueBrain TrueBrain merged commit e404d16 into OpenTTD:master Oct 3, 2021
16 checks passed
Loading
JGRennison added a commit to JGRennison/OpenTTD-patches that referenced this issue Oct 3, 2021
…n a docking tile (#9594)

See: OpenTTD/OpenTTD#9591
See: OpenTTD/OpenTTD#9594

Non-extended savegame bump to be applied later

(cherry picked from commit e404d16)

# Conflicts:
#	src/object_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Oct 16, 2021
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants