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

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

Choose a reason for hiding this comment

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

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.

@glx22 glx22 added the backport requested This PR should be backport to current release (RC / stable) label Oct 2, 2021
@SamuXarick SamuXarick force-pushed the remove-docking-tile-on-placing-object branch 2 times, most recently from 606eba0 to f122756 Compare October 2, 2021 21:22
LordAro
LordAro previously approved these changes Oct 3, 2021
src/saveload/afterload.cpp Outdated Show resolved Hide resolved
Copy link
Member

@TrueBrain TrueBrain left a comment

Choose a reason for hiding this comment

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

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

@TrueBrain TrueBrain merged commit e404d16 into OpenTTD:master Oct 3, 2021
JGRennison added a commit to JGRennison/OpenTTD-patches that referenced this pull request 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 pushed a commit to TrueBrain/OpenTTD that referenced this pull request Oct 16, 2021
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this pull request Oct 16, 2021
TrueBrain pushed a commit that referenced this pull request Oct 16, 2021
@TrueBrain TrueBrain removed the backport requested This PR should be backport to current release (RC / stable) label Oct 16, 2021
@LordAro LordAro added the backported This PR is backported to a current release (RC / stable) label Oct 23, 2022
@SamuXarick SamuXarick deleted the remove-docking-tile-on-placing-object branch December 5, 2022 11:01
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

5 participants