Page 1 of 1

exchange setup

Posted: Wed Sep 13, 2017 1:08 pm
by smu42
Hi,

I'm wondering if it would be possible to make some kind of "trade machine" that trades items fairly, meaning in a 1-1 ratio.

General setup:
2 conveyors bringing one type of item each, let's say wood and coal. The trade machine should than only allow the coal to proceed, if there is also [Edit:] wood and vice versa.
Ideally, it should be fair, so that each arriving coal let's exactly one wood through and vice versa.

I played around with combinators a bit, but couldn't really find a good solution.

Or maybe I should just make a custom assembly machine for that? But then I would have to make one for each set of items, I guess?

Re: exchange setup

Posted: Wed Sep 13, 2017 3:53 pm
by Greybeard_LXI
Load the items into a pair of chests with inserters for output. Then connect the chest to the opposite inserter with a green wire and the condition "If anything > 0". Also set the stack size override on the inserter to 1.

They say a picture is worth a thousand words. Here is a blue print string so you can create your own picture.
Blueprint

Re: exchange setup

Posted: Wed Sep 13, 2017 7:38 pm
by smu42
Ah, so simple, now I'm a little mad, I didn't think of it myself :D
Thanks!