Posted 15 May 2014 - 09:32 PM
I have an ender quarry running and a friend of mine has a Digital Miner, and yet another has a MFR Mining Laser running. So we wanted to do a little competition to see who has the best net result of ores. This sprung the idea of writing a program which keeps track of what has been mined by each machine and displays this on a monitor.
The way I envisioned doing this is to have each machine output to a chest, have a turtle monitor the contents of said chest then placing the contents in another chest which will be picked up by the AE network.
Now in my main program, I thought about doing something along these lines:
But what happens if I get a message from the Ender Quarry Turtle, and while I'm processing this message, the MFR Mining Laser Turtle sends me another message. Will this get lost? Or will all messages be queued and eventually picked up when someone calls for a pullEvent('rednet_message')?
Alternatively, is there a more elegant way of doing this?
The way I envisioned doing this is to have each machine output to a chest, have a turtle monitor the contents of said chest then placing the contents in another chest which will be picked up by the AE network.
Now in my main program, I thought about doing something along these lines:
while true do
event, ID, message, dist = os.pullEvent('rednet_message')
processInput(ID, message)
end
But what happens if I get a message from the Ender Quarry Turtle, and while I'm processing this message, the MFR Mining Laser Turtle sends me another message. Will this get lost? Or will all messages be queued and eventually picked up when someone calls for a pullEvent('rednet_message')?
Alternatively, is there a more elegant way of doing this?