Feature: Remember the last-used signal between games #9792
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.