First commit. Not even working prototype yet.

This commit is contained in:
Wahlolly
2025-04-02 19:39:36 +03:00
parent dd3e9e0d6d
commit 4adc959549
7 changed files with 226 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
local componentlib = {}
function componentlib.get(address)
checkArg(1, address, "string")
assert(#address >= 3, "abbreviated address must be at least 3 characters long")
local components = component.list()
for currentAddress, name in pairs(components) do
if currentAddress:find("^" .. address) then
return(currentAddress)
end
end
return nil, "full address not found"
end
componentlib.invoke = component.invoke
return(componentlib)