Page 1 of 1

Disabling depots

Posted: Tue May 29, 2018 7:33 pm
by Erisea
I have a problem with fluid wagons occasionally getting filled with the wrong fluid, and then going around screwing up basically everything. The same thing is happening with cargo wagons, but this is less of a problem as filter inserters are set up properly at stations (now - thanks to this forum!) so don't try to unload the wrong thing. I've tried to solve this by having depots read the train contents and disable if there is anything left in the train. The problem is, this isn't working.

I've tried two methods - first, connecting the station directly to a pole, and then reading the train contents and only enabling the stop if the train is empty. This looks like it is going to work - lamp is green when no train is in the station, train comes in, lamp goes blue if train is empty, and red if not empty. Problem is, the train still gets a new schedule and drives away.

The second solution I tried was a suggestion I read in this forum, whereby a decider combinator reads the train contents and only sends the depot signal if the train is empty. Again, this looks like it is working - lamp is green with no train, blue with an empty train and purple with a non-empty train (no longer a depot bus has the same name as the depots). But, again, the train will get a new schedule and drive away!

How can I actually stop a train in a depot? Disabling the depot doesn't do anything, stopping the station even being a depot isn't doing anything! I just don't understand how the train is getting a schedule.

Re: Disabling depots

Posted: Wed May 30, 2018 5:38 am
by Optera
Disabling stops is not supported by LTN.
It should work most of the time, but there can be unforseeable side effects e.g. if a stop is disabled between LTN polling the stop and generating deliveries

As for your original problem of wrong fluids and items being loaded.
For items use the stops I posted in the design thread or demo.
For fluid loading control pumps like loading station inserters
For fluid unloading either use dedicated stations per fluid, or control pumps through inventory sensor instead of stop output to get rid of rounding errors.

Re: Disabling depots

Posted: Tue Jan 18, 2022 4:54 pm
by MrJoshua
Super old thread but still comes up in google.

To prevent non-empty trains from dispatching:
Wire the Depot train stop to a Rail signal in front of it. If train not empty, then disable the rail signal. Can also add a speaker for an alert too.
Works for both standard and fluid cargo.

Re: Disabling depots

Posted: Fri Jan 21, 2022 8:32 pm
by Xynariz
MrJoshua wrote:
Tue Jan 18, 2022 4:54 pm
Super old thread but still comes up in google.

To prevent non-empty trains from dispatching:
Wire the Depot train stop to a Rail signal in front of it. If train not empty, then disable the rail signal. Can also add a speaker for an alert too.
Works for both standard and fluid cargo.
Yup, this idea does work great!

I take it even one step further and I tie a decider combinator to the depot station, set to "read train contents". The decider combinator will output the "is depot" signal *only if* the train is empty. That way, if a train does come back with something in it, wherever it ends up isn't even considered a depot, so LTN won't even attempt to dispatch it.

Of course, I do also hook it to a speaker because I want my LTN to have its trains!

Re: Disabling depots

Posted: Fri Feb 11, 2022 7:09 am
by Optera
MrJoshua wrote:
Tue Jan 18, 2022 4:54 pm
Super old thread but still comes up in google.

To prevent non-empty trains from dispatching:
Wire the Depot train stop to a Rail signal in front of it. If train not empty, then disable the rail signal. Can also add a speaker for an alert too.
Works for both standard and fluid cargo.
A much cleaner way is to only input a Depot signal when the parked train is empty.