Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Ingot Fluid Transfer by CheeseLiker - Computer Craft 1.99.1 --
- -- For transferring an ingot of liquid at a time over network cables and modems. Written to be used for smeltery automation.
- -- Does not currently prevent sending less than an ingot if output tank has less than an ingot of space left. (If you use an output tank with a max capacity that's a multiple of an ingot (144) you don't need to worry about this)
- -- SETTINGS ========================
- -- Modem name of the input tank; e.g. a smeltery drain
- local inputTankName = "tconstruct:drain_0"
- -- Comma separated list of modem names of the output tanks; e.g. the smeltery casting tables
- local outputTanks = {"tconstruct:table_0", "tconstruct:table_1"}
- -- END SETTINGS =====================
- local inputTank = peripheral.wrap(inputTankName)
- while true do
- local tanks = inputTank.tanks()
- if tanks then
- for _, liquid in pairs(tanks) do
- if liquid.amount >= 144 then
- for _, tank in pairs(outputTanks) do
- if inputTank.pushFluid(tank, 144, liquid.name) == 144 then
- break
- end
- end
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment