[NEW] Switchs i triggers dependents enllaçats
[NEW] Visió remota al obrir-se una porta
This commit is contained in:
@@ -18,6 +18,31 @@ function remove_actor(actor)
|
||||
end
|
||||
end
|
||||
|
||||
function disable_actor_by_id( remove_set )
|
||||
local id_list = {}
|
||||
local ok = false
|
||||
-- Construir llista per a eliminar
|
||||
if type(remove_set) == "string" then
|
||||
id_list[remove_set] = true
|
||||
ok = true
|
||||
elseif type(remove_set) == "table" then
|
||||
for _, v in ipairs(remove_set) do
|
||||
ok = true
|
||||
id_list[v] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- eliminar
|
||||
if ok then
|
||||
for index, actor in pairs(actors) do
|
||||
if id_list[actor.id] then
|
||||
-- actors[index]=nil
|
||||
actor.enabled=false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function draw_shiny_rect(x, y, w, h, color, shine_color)
|
||||
draw.rect(x,y,w,h,color)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user