LTN stop output gives wrong item count
Posted: Tue Oct 04, 2022 6:20 pm
I have a station that provides multiple items and does count perfect loading by removing any excess items.
This usually clears all loading inserters so when the next train arrives they pick up the right items and load them. But sometimes a full cargo wagon is requested. That means the inserters fill up the cargo wagon up to the last slot until no more can fit and then the train leaves. This can leave inserters with items in hand hovering over the track. Now the idea is that when the next train arrives the items are dumped into the cargo wagon. But then they are detected as excess items and removed again. So far the theory.
But what seem to happen is that the items are dumped into the arriving train before LTN output combinator gets programmed. I think this happens at the temporary stop
When LTN gets around to programming the output combinator the cargo wagon already contains the left over items and LTN sees that as "existing cargo". This then A) leaves the wrong items on the train, B) means the train has less slots for the actual cargo than LTN calculated and the loading may never finish.
Is this caused by the temporary stop with "0 second passed"? Will the inserters load the items at the temporary stop and then when LTN sees the train at the actual stop the cargo is already loaded? Wasn't there an LTN option to have temporary stops without condition so the train never actually stops there?
Or is the game just loading the items before the LTN event handler gets called? In that case couldn't LTN read the trains cargo content at the temporary stop so items help over the track aren't counted as existing cargo?
PS: I do see the option about not reporting existing cargo. But I would rather keep existing cargo and just have LTN report that correctly.
This usually clears all loading inserters so when the next train arrives they pick up the right items and load them. But sometimes a full cargo wagon is requested. That means the inserters fill up the cargo wagon up to the last slot until no more can fit and then the train leaves. This can leave inserters with items in hand hovering over the track. Now the idea is that when the next train arrives the items are dumped into the cargo wagon. But then they are detected as excess items and removed again. So far the theory.
But what seem to happen is that the items are dumped into the arriving train before LTN output combinator gets programmed. I think this happens at the temporary stop
When LTN gets around to programming the output combinator the cargo wagon already contains the left over items and LTN sees that as "existing cargo". This then A) leaves the wrong items on the train, B) means the train has less slots for the actual cargo than LTN calculated and the loading may never finish.
Is this caused by the temporary stop with "0 second passed"? Will the inserters load the items at the temporary stop and then when LTN sees the train at the actual stop the cargo is already loaded? Wasn't there an LTN option to have temporary stops without condition so the train never actually stops there?
Or is the game just loading the items before the LTN event handler gets called? In that case couldn't LTN read the trains cargo content at the temporary stop so items help over the track aren't counted as existing cargo?
PS: I do see the option about not reporting existing cargo. But I would rather keep existing cargo and just have LTN report that correctly.