Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- term.setTextColor(colors.gray)
- term.write("Looking for reactor...")
- while true do
- -- PULL DATA
- event, msg = rednet.receive("reactor_server")
- energy = msg.energy
- control = msg.control
- active = msg.active
- -- GUI
- term.clear()
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,1)
- term.write("Reactor Client")
- term.setCursorPos(1,2)
- if active then
- term.setTextColor(colors.green)
- term.write("Active")
- else
- term.setTextColor(colors.red)
- term.write("Inactive")
- end
- term.setCursorPos(1,3)
- term.setTextColor(colors.orange)
- term.write(tostring(energy) .. " RF")
- term.setCursorPos(1,4)
- term.setTextColor(colors.lightBlue)
- term.write("Control Rods @ " .. control .. "%")
- term.setCursorPos(1,5)
- term.setTextColor(colors.pink)
- term.write("Set ")
- term.setTextColor(colors.white)
- control = read()
- if #control > 0 then
- term.setTextColor(colors.gray)
- term.write("...")
- rednet.broadcast(control, "reactor_client")
- os.sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement