mirror of
https://github.com/kepler155c/opus
synced 2025-01-24 22:26:53 +00:00
cleanup
This commit is contained in:
parent
00fe2c9989
commit
bf3875adcb
@ -1107,10 +1107,10 @@ function turtle.dropDownAt(pt, ...) return _actionDownAt(actionsAt.drop, pt,
|
||||
function turtle.dropForwardAt(pt, ...) return _actionForwardAt(actionsAt.drop, pt, ...) end
|
||||
function turtle.dropUpAt(pt, ...) return _actionUpAt(actionsAt.drop, pt, ...) end
|
||||
|
||||
function turtle.suckAt(pt, qty) return _actionAt(actionsAt.suck, pt, qty) end
|
||||
function turtle.suckDownAt(pt, qty) return _actionDownAt(actionsAt.suck, pt, qty) end
|
||||
function turtle.suckForwardAt(pt, qty) return _actionForwardAt(actionsAt.suck, pt, qty) end
|
||||
function turtle.suckUpAt(pt, qty) return _actionUpAt(actionsAt.suck, pt, qty) end
|
||||
function turtle.suckAt(pt, qty) return _actionAt(actionsAt.suck, pt, qty or 64) end
|
||||
function turtle.suckDownAt(pt, qty) return _actionDownAt(actionsAt.suck, pt, qty or 64) end
|
||||
function turtle.suckForwardAt(pt, qty) return _actionForwardAt(actionsAt.suck, pt, qty or 64) end
|
||||
function turtle.suckUpAt(pt, qty) return _actionUpAt(actionsAt.suck, pt, qty or 64) end
|
||||
|
||||
function turtle.compareAt(pt) return _actionAt(actionsAt.compare, pt) end
|
||||
function turtle.compareDownAt(pt) return _actionDownAt(actionsAt.compare, pt) end
|
||||
|
@ -116,18 +116,23 @@ end)
|
||||
local info = {
|
||||
id = os.getComputerID()
|
||||
}
|
||||
local infoTimer = os.clock()
|
||||
|
||||
local function sendInfo()
|
||||
info.label = os.getComputerLabel()
|
||||
info.uptime = math.floor(os.clock())
|
||||
if turtle then
|
||||
info.fuel = turtle.getFuelLevel()
|
||||
info.status = turtle.status
|
||||
info.point = turtle.point
|
||||
info.inventory = turtle.getInventory()
|
||||
info.slotIndex = turtle.getSelectedSlot()
|
||||
|
||||
if os.clock() - infoTimer >= 1 then -- don't flood
|
||||
infoTimer = os.clock()
|
||||
info.label = os.getComputerLabel()
|
||||
info.uptime = math.floor(os.clock())
|
||||
if turtle then
|
||||
info.fuel = turtle.getFuelLevel()
|
||||
info.status = turtle.status
|
||||
info.point = turtle.point
|
||||
info.inventory = turtle.getInventory()
|
||||
info.slotIndex = turtle.getSelectedSlot()
|
||||
end
|
||||
device.wireless_modem.transmit(999, os.getComputerID(), info)
|
||||
end
|
||||
device.wireless_modem.transmit(999, os.getComputerID(), info)
|
||||
end
|
||||
|
||||
-- every 10 seconds, send out this computer's info
|
||||
|
Loading…
Reference in New Issue
Block a user