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 #12591: Give descriptive error when station construction fails due to wrong layout #12678

Merged
merged 1 commit into from
May 22, 2024

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

Per #12591, some NewGRF station sets require a specific arrangement of tiles for certain station layouts.

Using drag-and-drop construction, the player can try to build a different tile arrangement, like only one tile for a station layout that requires two tracks. This fails, but only returns a generic error message.

Description

Return a descriptive error message.

Closes #12591.

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, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@LordAro
Copy link
Member

LordAro commented May 13, 2024

Why not have two error messages? The "or" makes the error message vague and confusing

@2TallTyler
Copy link
Member Author

Hmm, good point.

@LordAro
Copy link
Member

LordAro commented May 13, 2024

Still feels a bit vague though... would it be overly specific to be something like

"...layout cannot be this many platforms"

?

& also for the other message

@PeterN
Copy link
Member

PeterN commented May 13, 2024

"... unsupported station layout"

@2TallTyler 2TallTyler added the backport requested This PR should be backport to current release (RC / stable) label May 14, 2024
@2TallTyler 2TallTyler merged commit 8f6e216 into OpenTTD:master May 22, 2024
16 checks passed
@2TallTyler 2TallTyler deleted the station-layout-error branch May 22, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport requested This PR should be backport to current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: No descriptive error message when building incorrect station layout using drag-and-drop
4 participants