[0.17.79] Inventory split does not round properly for Cargo Wagons
Posted: Sun Jan 19, 2020 6:39 pm
What did you do?
I have an assembly machine making cargo wagons. They are deposited in a chest, with an inserter circuit controlled to only put 16 wagons in (I am using 1-8 trains, so this is enough wagons for 2 trains).
I don't have logistic bots yet, so I grab the wagons manually. I just wanted to make 1 train, so I ctrl+right-clicked on the chest to grab 8 wagons.
What happened?
Instead of grabbing 8 wagons, I grabbed 6 wagons, leaving 10 in the box. I waited for the chest to refill, and when I tried a second time, I grabbed 7 wagons, leaving 9 in the box. A third try worked, grabbing 8. A fourth attempt yielded 7.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
I would expect to grab 8 wagons every time. I suspect the issue has to do with stack size. I believe the game is grabbing half of each stack, which is resulting in rounding errors.
I would expect the game to look at the total contents of the chest first, find the number to grab, and then extract that amount of items.
I have an assembly machine making cargo wagons. They are deposited in a chest, with an inserter circuit controlled to only put 16 wagons in (I am using 1-8 trains, so this is enough wagons for 2 trains).
I don't have logistic bots yet, so I grab the wagons manually. I just wanted to make 1 train, so I ctrl+right-clicked on the chest to grab 8 wagons.
What happened?
Instead of grabbing 8 wagons, I grabbed 6 wagons, leaving 10 in the box. I waited for the chest to refill, and when I tried a second time, I grabbed 7 wagons, leaving 9 in the box. A third try worked, grabbing 8. A fourth attempt yielded 7.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
I would expect to grab 8 wagons every time. I suspect the issue has to do with stack size. I believe the game is grabbing half of each stack, which is resulting in rounding errors.
I would expect the game to look at the total contents of the chest first, find the number to grab, and then extract that amount of items.