Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local component = require("sides")
- --Variables
- reactorslots = 54 -- Number of VISIBLE inventory slots in reactor (i.e. 54 for max sized 6-chamber reactor)
- celltype = "60k NaK Coolantcell" -- Label of coolant cell (i.e. "60k Nak Coolantcell")
- --Do not edit below this line
- coolantcells = {}
- function findCoolantCells()
- for slot = 1, reactorslots do
- if component.transposer.getStackInSlot(sides.down, slot).label == celltype then
- table.insert(coolantcells, slot)
- end
- end
- print("Found coolant cells in slot(s) " .. table.concat(coolantcells,", "))
- end
- function coolantCheck()
- for _, slot in pairs(coolantcells) do
- if component.transposer.getStackInSlot(sides.down, slot).damage > 50 then
- component.transposer.transferItem(sides.down, sides.up, 1, slot, 1)
- print("Removed hot cell from slot " .. slot .. " for cooling.")
- end
- end
- end
- findCoolantCells()
- while true do
- coolantCheck()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement