Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- wireless info--
- local modemSide = "left"
- local canvas = peripheral.wrap("back").canvas()
- canvas.clear()
- local group = canvas.addGroup({0, 0})
- local react1Info = nil
- local react1Status = nil
- function init()
- group.addRectangle(0, 0, 100, 50, 0xDDDDDD)
- rednet.open(modemSide)
- end
- function run()
- init()
- react1Info = group.addText({5, 5}, "Reactor Info")
- react1Info.setScale(.75)
- react1Status = group.addText({5, 12}, "Reactor status")
- react1Status.setScale(.5)
- while true do
- id, msg = rednet.receive("reactor")
- react1Info.setText(msg["current"].. " / ".. msg["max"])
- react1Status.setText("Is on: "..tostring(msg["active"]))
- sleep(.2)
- end
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement