[NEW] Switchs i triggers dependents enllaçats

[NEW] Visió remota al obrir-se una porta
This commit is contained in:
2026-04-05 16:17:24 +02:00
parent 679e22f7fd
commit 4c2c8dc84f
5 changed files with 104 additions and 20 deletions

View File

@@ -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)