Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Main controller updates custom HUD
- All other computers send information in channel 0
- The reply channel will detrimne the purpuse of the transmission:
- a computer send on channel 0 with reply on channel 1, this indicates it is from a mining robot
- --]]
- local modem = peripheral.wrap("left")
- local hud = peripheral.wrap("top")
- modem.open(1)
- function miner(message)
- hud.clear()
- hud.addText(400, 95, "Miner status: " + message, 0xFFFFFF)
- end
- while true do
- local event, side, channel, reply, msg, distance = os.pullEvent("modem_message")
- if channel == 1 then
- if reply == 3 then
- miner(msg)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement