Hello,
I am looking for a way to interact with Railcraft Item Loaders (and Unloaders) via a CC Computer. The goal here being the ability to unload coal at will.
More specifically, I have a train that collects supplies from around the base and brings them to the main station to be transported to my underground storage facility. Since some of the "farms" around the base use machines that run on charcoal power, I want to able to decide whether to unload said coal from the train.
I am rather familiar with lua and coding in general so that should not an issue.
Some code:
chest = peripheral.wrap("top") function getAmount() local amount = 0 for i=1, chest.getInventorySize() do slotinfo = chest.getStackInSlot(i) if slotinfo then if slotinfo.name == "coal" then amount = amount + slotinfo.qty end end end return amount end print(getAmount) -- Now the pseudo part if getAmount < 64 then --Add (64 - getAmount) to Unloader filter and set mode to "Transfer" end
TheCreepySheep