Skip to content

Conversation

@JensenJ
Copy link
Contributor

@JensenJ JensenJ commented Jan 22, 2026

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:
image

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

Added a filter for delivering packages to allow much greater control over the package delivery process. For most people, the blank filter will do nicely, as this is the current behaviour. For others, most setups will probably consist of multiple Deliver Package instructions in whatever order of priority they want packages delivered followed by a wildcard for any remaining on the train. Added language entries and tooltips for this filter and ran datagen.
Added the mail transfer logic for explicit fetching and delivery logic. When these are enabled, fetching and delivery can only happen when those are the current instruction in the trains schedule. When these options are disabled, the existing behaviour is used.
Added the buttons to the postbox UI for the new functionality and ensured those values are properly synced and used during the mail transfer. This completes the new logic.
Fix an issue where a blank filter would not function as a wildcard in the mail transfer.
Added new icons which are used for explicit fetch / deliver.
@VoidLeech VoidLeech added the pr type: feature PR adds a new feature or changes an existing feature label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr type: feature PR adds a new feature or changes an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule entry retrieve packages picks up packages indiscriminantly of target mask

2 participants