Simple Requester/Provider System
Requirements
Provider: No requirements, just place it down and it'll work!
Requester: When placing down a requester station you will need to change three things:
- Combinator - Put a signal for 1 of whatever you are trying to request which will set the filters on your inserters so you never get the wrong item delivered. The L signal should be left alone if you don't want to use buffers for your trains. If you do use buffers, change the L count to whatever the total amount of trains your stations can support is. (a buffer is what allows other trains to wait their 'turn' before entering the station and dropping off cargo)
- Decider Combinator - Input the amount you want stored in the train stop before a request is made. A full train's worth is a good start, but you can double it if needed. E.g. a train can hold 16k plates, so put 16k (or more if needed) here. A request will only be made if there's less than 16k iron plates.
- Station - Name MUST be in format '[item icon]Requester', with the [item icon] being the icon you are requesting.
How it works
Every train has 4 interrupts (And NO regular stations!):
- Refuel: If the train is low on fuel, go to a depot and refuel ALLOW INTERRUPTS ON OTHER INTERRUPTS
- Conditions - Fuel (all) [Fuel Choice] < 20 (or whatever makes sense, I use solid fuel)
- Targets - Refuel - All locomotives fully fueled
- Load Cargo: If cargo is empty, go to a provider and fill up
- Conditions - Empty cargo inventory
- Targets - Provider - Full cargo inventory
- Deliver Cargo: If full on cargo, deliver to [X] requester station
- Conditions - Full cargo inventory
- Targets - [item parameter wildcard]Requester - Empty Cargo
- Providers Full: If no providers open, go to depot and wait until one is
- Conditions - Provider is full
- Targets - Refuel - Provider is not full
The real bread and butter to this system is the [item parameter wildcard] that was added in 2.0. When a requester station is low on items, the combinators send a signal to the station that sets it's train limit and 'opens' it for deliveries. A train that is full on the cargo the requester wants then gets sent to it. The wildcard gets set when the train goes to the provider station. If no requester stations want items, the trains will either go to a provider station, fill their cargo, then wait until a request is made. Or they will wait at the refueling depot until there is a space in a provider station that they can fill.
