changes
This commit is contained in:
@@ -40,10 +40,11 @@ function tabcat(t1,t2)
|
||||
for i=1,#t2 do t1[#t1+1]=t2[i] end
|
||||
end
|
||||
|
||||
-- Example: multistart(function(t) return tangible.id(t)%3==0 end,function() print("Tangible "..tangible.id(tangible.place()).." here") end)
|
||||
function multistart(filter,closure)
|
||||
local lis=tangible.scan('nowhere',0,0,1000000000,false)
|
||||
lis=tabcat(lis,tangible.scan('main',0,0,1000000000,true)
|
||||
for _,t in iparis(lis) do if filter(t) then closure(t) end end
|
||||
local lis=tangible.scan('nowhere',0,0,100,false)
|
||||
tabcat(lis,tangible.scan('main',0,0,100,true))
|
||||
for _,t in ipairs(lis) do if filter(t) then tangible.start(t,closure) end end
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user