Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("right")
- local monitor = peripheral.wrap("top")
- monitor.clear()
- flag = true
- while flag do
- local reactorContents = reactor.getAllStacks(false)
- if reactor.getHeat() < 2000 then
- monitor.setCursorPos(1,1)
- monitor.write("Heat: ".. reactor.getHeat())
- redstone.setOutput("right", true)
- sleep(0)
- else
- redstone.setOutput("right", false)
- flag = false
- print("fail safe tripped")
- end
- for slot, item in pairs(reactorContents) do
- if item ~= nil then
- if item["display_name"] == "LZH-Condensator" then
- if item["dmg"] >= 80000 then
- -- shuts off the reactor then swaps
- redstone.setOutput("right", false)
- reactor.pushItemIntoSlot("north", slot, 1, 2)
- reactor.pullItemIntoSlot("north", 1, 1, slot)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement