entities - display on overlay
This commit is contained in:
@@ -98,9 +98,9 @@ local function dropOff()
|
|||||||
inv = turtle.getSummedInventory()
|
inv = turtle.getSummedInventory()
|
||||||
for _, slot in pairs(inv) do
|
for _, slot in pairs(inv) do
|
||||||
if slot.count >= 16 or turtle.getSlot(8).count > 0 then
|
if slot.count >= 16 or turtle.getSlot(8).count > 0 then
|
||||||
local chests = findChests()
|
if slot.name ~= 'plethora:module' then
|
||||||
for c in Point.iterateClosest(turtle.point, chests) do
|
local chests = findChests()
|
||||||
if slot.name ~= 'plethora:module' then
|
for c in Point.iterateClosest(turtle.point, chests) do
|
||||||
if turtle.dropDownAt(c, slot.name) then
|
if turtle.dropDownAt(c, slot.name) then
|
||||||
chest = c
|
chest = c
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -49,17 +49,17 @@ function page:eventHandler(event)
|
|||||||
UI.Page.eventHandler(self, event)
|
UI.Page.eventHandler(self, event)
|
||||||
end
|
end
|
||||||
|
|
||||||
Event.onInterval(1, function()
|
Event.onInterval(.5, function()
|
||||||
page.grid:setValues(sensor.sense())
|
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.grid:draw()
|
||||||
page:sync()
|
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)
|
end)
|
||||||
|
|
||||||
UI:setPage(page)
|
UI:setPage(page)
|
||||||
|
|||||||
Reference in New Issue
Block a user