test
This commit is contained in:
parent
b044499cca
commit
43313b3869
0
startup.lua
Normal file
0
startup.lua
Normal file
13
status_broadcast.lua
Normal file
13
status_broadcast.lua
Normal file
@ -0,0 +1,13 @@
|
||||
local id = os.getComputerID()
|
||||
local status = "idle" -- or "busy", "charging", etc.
|
||||
|
||||
while true do
|
||||
local msg = {
|
||||
id = id,
|
||||
label = os.getComputerLabel() or ("Turtle_" .. id),
|
||||
status = status,
|
||||
time = os.clock()
|
||||
}
|
||||
rednet.broadcast(textutils.serialize(msg), "turtle_status")
|
||||
sleep(5)
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user