[0.17.79] Inventory split does not round properly for Cargo Wagons

Bugs that are actually features.
Post Reply
n_slash_a
Inserter
Inserter
Posts: 28
Joined: Wed Feb 27, 2019 1:05 am
Contact:

[0.17.79] Inventory split does not round properly for Cargo Wagons

Post by n_slash_a »

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.
Attachments
factorio-current.log
log file
(8.01 KiB) Downloaded 9 times

Loewchen
Global Moderator
Global Moderator
Posts: 5825
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.17.79] Inventory split does not round properly for Cargo Wagons

Post by Loewchen »

Ctrl + right click on a chest will move half of every stack in its inventory, rounded down but at least one of every stack. Assuming those 16 cargo wagons distribute along 3x5 and 1x1 it should move 7 into the player inventory and when I try it this is the case.

Rseding91
Factorio Staff
Factorio Staff
Posts: 10494
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.79] Inventory split does not round properly for Cargo Wagons

Post by Rseding91 »

Thanks for the report. It works as Loewchen says.
If you want to get ahold of me I'm almost always on Discord.

n_slash_a
Inserter
Inserter
Posts: 28
Joined: Wed Feb 27, 2019 1:05 am
Contact:

Re: [0.17.79] Inventory split does not round properly for Cargo Wagons

Post by n_slash_a »

Okay, thanks.

Post Reply

Return to “Not a bug”

Who is online

Users browsing this forum: No registered users