entities - display on overlay
This commit is contained in:
@@ -98,9 +98,9 @@ local function dropOff()
|
||||
inv = turtle.getSummedInventory()
|
||||
for _, slot in pairs(inv) do
|
||||
if slot.count >= 16 or turtle.getSlot(8).count > 0 then
|
||||
local chests = findChests()
|
||||
for c in Point.iterateClosest(turtle.point, chests) do
|
||||
if slot.name ~= 'plethora:module' then
|
||||
if slot.name ~= 'plethora:module' then
|
||||
local chests = findChests()
|
||||
for c in Point.iterateClosest(turtle.point, chests) do
|
||||
if turtle.dropDownAt(c, slot.name) then
|
||||
chest = c
|
||||
break
|
||||
|
||||
@@ -49,17 +49,17 @@ function page:eventHandler(event)
|
||||
UI.Page.eventHandler(self, event)
|
||||
end
|
||||
|
||||
Event.onInterval(1, function()
|
||||
page.grid:setValues(sensor.sense())
|
||||
Event.onInterval(.5, function()
|
||||
local entities = sensor.sense()
|
||||
local meta = ni.getMetaOwner()
|
||||
Util.filterInplace(entities, function(e) return e.id ~= meta.id end)
|
||||
|
||||
canvas:clear()
|
||||
Project:drawPoints(meta, entities, 'X', 0xFFDF50AA)
|
||||
|
||||
page.grid:setValues(entities)
|
||||
page.grid:draw()
|
||||
page:sync()
|
||||
local meta = ni.getMetaOwner()
|
||||
canvas:clear()
|
||||
for _, b in pairs(page.grid.values) do
|
||||
if b.id ~= meta.id then
|
||||
Project:draw(meta, b, 'X', 0xFFDF50AA)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
UI:setPage(page)
|
||||
|
||||
Reference in New Issue
Block a user