Auto printer Resupply
Hello fellow stationeers!
I am sharing an IC code for an automatic resupply of up to 6 machines.
General concept is based on the idea of Cow are evil (https://steamcommunity.com/sharedfiles/filedetails/?id=2839308009). However, I didn’t find it convenient to use (only supply full ingot stacks, only one machine). So I coded my own that can:
– Use only one IC chip to connect up to 6 machines (the code I provide is prepared for 3 machines)
– Split ingots stacks to the correct size.
– Detect when Vending Machine is depleted
Note: Auto craft code has been removed and available on a separate code (working on it)
How to Setup:
1) Install all parts as explained in the picture.
2) Assign IC housing devices for each of the machines you want to use. I strongly advise to assign the devices in the same order as the items flow otherwise it can be glitchy (d0=first machine, d1= second etc…)
3) With labeller, rename the following:
– Refrigerated Vending Machine : "V MACHINE"
– Stacker just after the RV Machine: "Stackervending" (note: I used the stacker with the items flowing right to left when facing the electric port)
– For each sorter assigned to a machine & device : "Sorterd0" / "Sorterd1" / "Sorterd2"etc…
– OPTIONAL : you can add a flashlight called "Alarmingot" that will trigger if ingot are missing
– OPTIONAL2 : you can also add a memory chip called "HashIngot" that will store the missing ingot hash (you can use a monitor hash display to visually see what’s missing)
4) In the IC code, you can change some parameters:
– line 0: defines your number of machines
– line 1: must be the double of line 1 or the code won’t work properly
– line 2: defines the limit at which the code will order a resupply (base code is 50)
– line 3: defines the amount of ingot to resupply
– line 6: if you are using more or less machine, you have to add or remove lines to have the same number of sorter hash name than machine. Otherwise the code will freeze…
With all that setup, it should be good to go!
I am not a pro coder, so pardon me if it can be messy at some points but I did try to leave as much comments as possible. And I didn’t define many variables because I was becoming short on line codes…
Enjoy!