mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-04-04 07:02:47 +02:00
Переходим на MineOS Standalone #1
This commit is contained in:
13
Libraries/Component.lua
Normal file
13
Libraries/Component.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user