1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-19 01:37:39 +00:00

refactor + cleanup

This commit is contained in:
kepler155c@gmail.com
2017-10-27 20:24:48 -04:00
parent cac15722b8
commit 1b9450017d
12 changed files with 371 additions and 430 deletions

View File

@@ -90,7 +90,7 @@ local function snmpConnection(socket)
}
if turtle then
info.fuel = turtle.getFuelLevel()
info.status = turtle.status
info.status = turtle.getStatus()
end
socket:write(info)
end
@@ -144,7 +144,7 @@ local function sendInfo()
info.uptime = math.floor(os.clock())
if turtle then
info.fuel = turtle.getFuelLevel()
info.status = turtle.status
info.status = turtle.getStatus()
info.point = turtle.point
info.inventory = turtle.getInventory()
info.slotIndex = turtle.getSelectedSlot()
@@ -166,7 +166,7 @@ Event.onInterval(10, function()
end)
Event.on('turtle_response', function()
if turtle.status ~= info.status or
if turtle.getStatus() ~= info.status or
turtle.fuel ~= info.fuel then
sendInfo()
end