Navigation Menu

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

Change: by default, make "unload all" leave stations empty #9301

Merged
merged 1 commit into from May 27, 2021

Conversation

TrueBrain
Copy link
Member

Fixes #9265

Motivation / Problem

Although you never have to use the Unload button, from a flow perspective it is very tempted to do:

Full load in station A
Unload in station B

To make a one-way trip happen.

Sadly, by default, Unload button makes it Unload and take cargo. This means that if for any reason the same cargo you are unloading is available at station B, it starts to load it up again. This is often unexpected, as shown by #9265. People also have a really hard time to come up with scenarios where this default makes sense.

Description

The current default makes total sense code-wise. By default the loading is set to "take cargo", and the Unload button merely toggles the unload state to Unload all or Unload if possible.

Either way, Transfer already toggles to and leave empty, so with this PR so that Unload.

Limitations

The order GUI is annoyingly weird, and makes little sense if you really play with it. Now if you press Unload twice, it doesn't return to the original state, but leaves no loading on. Transfer already had similar issues. Resolving this requires a nice change of the full Order GUI .. not for this PR :D

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

@TrueBrain TrueBrain merged commit 7648483 into OpenTTD:master May 27, 2021
@TrueBrain TrueBrain deleted the unload-default branch May 27, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change "unload" to default to "unload and leave empty"
2 participants