Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Geronimo(TM) Hyper-Breeder XL
- IC2 Reactor Control Program
- DE, Inc. 2015
- --]]
- local component = require("component")
- local sides = require("sides")
- local rs = component.redstone
- -- Set Depleted Isotope Slots
- local enrichedCells = {}
- enrichedCells[5] = "IC2:item.reactorIsotopeCell"
- enrichedCells[13] = "IC2:item.reactorIsotopeCell"
- enrichedCells[15] = "IC2:item.reactorIsotopeCell"
- enrichedCells[21] = "IC2:item.reactorIsotopeCell"
- enrichedCells[23] = "IC2:item.reactorIsotopeCell"
- enrichedCells[25] = "IC2:item.reactorIsotopeCell"
- enrichedCells[30] = "IC2:item.reactorIsotopeCell"
- enrichedCells[33] = "IC2:item.reactorIsotopeCell"
- enrichedCells[36] = "IC2:item.reactorIsotopeCell"
- enrichedCells[40] = "IC2:item.reactorIsotopeCell"
- enrichedCells[42] = "IC2:item.reactorIsotopeCell"
- enrichedCells[50] = "IC2:item.reactorIsotopeCell"
- -- Set Uranium Cell Slots
- local fuelCells = {}
- fuelCells[14] = "IC2:item.reactorUraniumSimple"
- fuelCells[22] = "IC2:item.reactorUraniumSimple"
- fuelCells[24] = "IC2:item.reactorUraniumSimple"
- fuelCells[31] = "IC2:item.reactorUraniumSimple"
- fuelCells[33] = "IC2:item.reactorUraniumSimple"
- fuelCells[41] = "IC2:item.reactorUraniumSimple"
- -- Run Script
- while true do
- local enriched = 12
- local fuel = 6
- -- Check for Depleted Isotope Cells
- for k, v in pairs(enrichedCells) do
- local itemStack = component.inventory_controller.getStackInSlot(k, sides.back)
- -- Compare Slot to Depleted Isotope Cell
- if tostring(itemStack.name) == tostring(v) then
- enriched = enriched - 1
- -- Turn on extraction
- else
- rs.setOutput(sides.left, 15)
- end
- -- Turn on activation signal
- if enriched == 0 then
- rs.setOutput(sides.left, 0)
- end
- end
- -- Check for Uranium Cells
- for k, v in pairs(fuelCells) do
- local itemStack = component.inventory_controller.getStackInSlot(k, sides.back)
- -- Compare Slot to Uranium Cell
- if tostring(itemStack.name) == tostring(v) then
- fuel = fuel - 1
- -- Turn on insertion
- else
- rs.setOutput(sides.right, 15)
- end
- -- Turn on activation signal
- if fuel == 0 then
- rs.setOutput(sides.right, 0)
- end
- end
- end
- --[[
- DISCLAIMER: This program is made by a virtual corporation, existing inside
- the Tekkify Minecraft server. For more information, contact the CEO at
- [email protected]. DO NOT DISTRIBUTE.
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement