Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- slots = {}
- function interface()
- termClear()
- term.write("ID of prototype reactor: ")
- prototype = read()
- prototype = "nuclear_reactor_"..prototype
- reactor = peripheral.wrap(prototype)
- end
- function termClear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function readReactor()
- for i =1,54 do
- if not (reactor.getStackInSlot(i) == null) then
- if reactor.getStackInSlot(i).raw_name == "ic2.reactoruraniumdual" then
- slots[i] = "dual"
- elseif reactor.getStackInSlot(i).raw_name == "ic2.reactoruraniumsimple" then
- slots[i] = "simple"
- else
- slots[i] = "ignore"
- end
- else
- slots[i] = "ignore"
- end
- end
- end
- function writeFile()
- file = fs.open("layout", "w")
- file.write(textutils.serialize(slots))
- file.close()
- end
- interface()
- readReactor()
- writeFile()
- print("done")
Add Comment
Please, Sign In to add comment