entities - display on overlay
This commit is contained in:
@@ -13,6 +13,8 @@ if not sensor or not sensor.sense then
|
|||||||
error('Plethora sensor must be equipped')
|
error('Plethora sensor must be equipped')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local id = sensor.getID()
|
||||||
|
|
||||||
UI:configure('Entities', ...)
|
UI:configure('Entities', ...)
|
||||||
|
|
||||||
local config = Config.load('Entities', { })
|
local config = Config.load('Entities', { })
|
||||||
@@ -63,10 +65,10 @@ end
|
|||||||
|
|
||||||
Event.onInterval(.5, function()
|
Event.onInterval(.5, function()
|
||||||
local entities = sensor.sense()
|
local entities = sensor.sense()
|
||||||
local meta = ni.getMetaOwner()
|
Util.filterInplace(entities, function(e) return e.id ~= id end)
|
||||||
Util.filterInplace(entities, function(e) return e.id ~= meta.id end)
|
|
||||||
|
|
||||||
if config.projecting then
|
if config.projecting then
|
||||||
|
local meta = ni.getMetaOwner()
|
||||||
Project.canvas:clear()
|
Project.canvas:clear()
|
||||||
Project:drawPoints(meta, entities, 'X', 0xFFDF50AA)
|
Project:drawPoints(meta, entities, 'X', 0xFFDF50AA)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user