mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
14 lines
291 B
Lua
14 lines
291 B
Lua
|
|
function component.get(type)
|
|
local address = component.list(type)()
|
|
if address then
|
|
return component.proxy(address)
|
|
end
|
|
|
|
return nil, "component with type \"" .. type .. "\" doesn't exists"
|
|
end
|
|
|
|
function component.isAvailable(type)
|
|
return component.list(type)() and true or false
|
|
end
|