Postbox Retrieve and Delivery Improvements #9901
Open
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.
Originally part of #9826, but this feature / fix has been expanded.
Fixes #7598
Hi there,
This PR adds a few things which adds more control for the user on how packages are fetched and delivered.
The first of these changes is the addition of a delivery filter for the deliver packages instruction, allowing more granular control over the priority in which packages are delivered. The default of a blank filter will perform the existing behaviour of a wildcard delivery, which means no existing setups will break. For those wanting further control, a typical schedule with this new system would have multiple delivery instructions in the order of delivery priority with the last instruction being a wildcard delivery for anything left on the train.
The other major part of this PR is the addition of two toggle buttons to the postbox UI which will enable a behaviour where packages will only do a fetch or delivery (one button for each) to that postbox if the instruction in the train is explicitly a Retrieve Package or Deliver Package instruction, as we can then filter for the contents of that instructions filter, which is a fix for #7598 and this also allows players to drive trains around with other instructions (or manually) without fear of accidentally filling their train with packages. If a button is not enabled the existing behaviour for either fetch or delivery will be used. These were added as buttons in the postbox rather than just changing the behaviour outright so users don't get confused when they update and behaviour has changed, and also so existing setups do not break.
Some translations were modified with these changes for the new tooltips.
Here is a screenshot of what the postbox UI now looks like with these buttons added:

I am not an artist, so feel free to change the icons / positions for these buttons, and also the tooltips for clarity. The spacing between the button "groups" is consistent with the schematicannon buttons.
Let me know if you have any questions, concerns or if you have anything that you want changed.
Thanks,
Jensen