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

Feature: Remember the last-used signal between games #9792

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

When the player opens the signal GUI, they find that last signal they used is selected. However, when starting a new game, this is not remembered and the selection defaults to a one-way path signal.

Before #8688, there was a setting to choose this new-game default, and the removal of the setting has generated many complaints.

Description

The last-used signal type is saved to the config file and initialized as the default when starting a new game.

It is also the selected signal if the signal GUI button is Ctrl-clicked on to select the signal tool without opening the signal GUI — reverting to pre-#8688 behavior.

Closes #9705.
Closes #9631.

Limitations

When a non-path signal is selected and then the signal GUI is reduced to show only path signals, the selected non-path signal remains the default and you can build them until you select something else. This is behavior introduced in #9617, but now it persists between games.

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')

JGRennison pushed a commit to JGRennison/OpenTTD-patches that referenced this pull request Jan 19, 2022
(cherry picked from commit a9de36ad23f30d125ed495f0bd84342b594d19df)

See: OpenTTD/OpenTTD#9792
@LordAro LordAro merged commit 7f0efbe into OpenTTD:master Feb 2, 2022
@2TallTyler 2TallTyler deleted the remember_signal branch February 2, 2022 22:00
@glx22 glx22 added the backport requested This PR should be backport to current release (RC / stable) label Feb 2, 2022
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this pull request Apr 2, 2022
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this pull request Apr 2, 2022
@TrueBrain TrueBrain 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 Apr 2, 2022
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
5 participants