e
This commit is contained in:
50
AceVM/disks/1h/sys/kernel/glib/component.lua
Normal file
50
AceVM/disks/1h/sys/kernel/glib/component.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
-- Copyright (C) 2025 ASTRONAND
|
||||
--local oldComponent = component
|
||||
--_G.component={}
|
||||
--local components={}
|
||||
--local all={}
|
||||
--local blacklisted={}
|
||||
--
|
||||
--function table.contains(tabl, query)
|
||||
-- for i,v in ipairs(tabl) do
|
||||
-- if v==query then
|
||||
-- return true
|
||||
-- end
|
||||
-- end
|
||||
-- return false
|
||||
--end
|
||||
--
|
||||
--for i,v in oldComponent.list() do
|
||||
-- if not components[i] then
|
||||
-- components[i]={}
|
||||
-- end
|
||||
-- components[i][#components[i]+1]={typ=i,obj=v}
|
||||
-- all[#all+1]={typ=i,obj=v}
|
||||
--end
|
||||
--
|
||||
--function component.list(filter)
|
||||
-- filter=filter or "all"
|
||||
-- local filtered
|
||||
-- if filter=="all" then
|
||||
-- filtered=all
|
||||
-- else
|
||||
-- filtered=components[filter]
|
||||
-- end
|
||||
-- local i=0
|
||||
-- return function()
|
||||
-- while i<#filtered do
|
||||
-- i=i+1
|
||||
-- if not table.contains(blacklisted, v.typ) then
|
||||
-- return v.typ, v.obj
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
--end
|
||||
--
|
||||
--function component.getSudo(key)
|
||||
-- if key==masterKey then
|
||||
-- return oldComponent
|
||||
-- end
|
||||
--end
|
||||
--
|
||||
--
|
||||
Reference in New Issue
Block a user