[1.1.5] Inserter sets stack size from the wrong tick when unloading train
Posted: Sat Dec 05, 2020 8:24 pm
Steps to reproduce:
- Train with contents arrives at station. Inserter is enabled/disabled on white dot > 0 and sets stack size on signal S. 2 constant combinators are set up to send 1 white dot and 3 signal S, but are switched off. Game time is paused.
- Enable both combinators.
- Move time forward one tick.
- Disable both combinators.
- Move time forward another tick. At this point, the inserter is enabled (green light is on), and the stack size has been overridden correctly:
- Move time forward another tick. The inserter grabs the contents of the train. It should grab 3 items, but only grabs 1.
This only happens on the first swing when the train has arrived. On subsequent swings, repeating the steps above will cause the inserter to grab 3 items, as expected. When an inserter is loading a train, repeating the steps above will cause the inserter to grab 3 items even on the first swing after the train arrives.
In the scenario above (first inserter swing while unloading the train), the inserter appears to be setting the stack size from the wrong tick. The steps below reproduce this:
- Same setup as above.
- Enable only the white dot combinator.
- Move time forward one tick.
- Disable the white dot combinator and enable the S=3 combinator.
- Move time forward one tick.
- Disable the S=3 combinator. At this point, the inserter is enabled, but the stack size still shows one, as expected.
- Move time forward one tick. The inserter has grabbed the contents of the train, but has grabbed 3 items instead of 1. Note that we can also see the inserter is now disabled (light is red) and stack size now shows 3, as it should be.
Repeating this second set of steps for subsequent inserter swings will result in one item being grabbed, as expected. Again, train loading does not have the same issue.
- Train with contents arrives at station. Inserter is enabled/disabled on white dot > 0 and sets stack size on signal S. 2 constant combinators are set up to send 1 white dot and 3 signal S, but are switched off. Game time is paused.
- Enable both combinators.
- Move time forward one tick.
- Disable both combinators.
- Move time forward another tick. At this point, the inserter is enabled (green light is on), and the stack size has been overridden correctly:
- Move time forward another tick. The inserter grabs the contents of the train. It should grab 3 items, but only grabs 1.
This only happens on the first swing when the train has arrived. On subsequent swings, repeating the steps above will cause the inserter to grab 3 items, as expected. When an inserter is loading a train, repeating the steps above will cause the inserter to grab 3 items even on the first swing after the train arrives.
In the scenario above (first inserter swing while unloading the train), the inserter appears to be setting the stack size from the wrong tick. The steps below reproduce this:
- Same setup as above.
- Enable only the white dot combinator.
- Move time forward one tick.
- Disable the white dot combinator and enable the S=3 combinator.
- Move time forward one tick.
- Disable the S=3 combinator. At this point, the inserter is enabled, but the stack size still shows one, as expected.
- Move time forward one tick. The inserter has grabbed the contents of the train, but has grabbed 3 items instead of 1. Note that we can also see the inserter is now disabled (light is red) and stack size now shows 3, as it should be.
Repeating this second set of steps for subsequent inserter swings will result in one item being grabbed, as expected. Again, train loading does not have the same issue.