mirror of
https://github.com/kepler155c/opus
synced 2025-05-18 23:34:10 +00:00
manipulators!
This commit is contained in:
parent
6674c715e0
commit
00fea37f3f
@ -155,7 +155,11 @@ end
|
|||||||
|
|
||||||
drivers['manipulator'] = function(dev)
|
drivers['manipulator'] = function(dev)
|
||||||
if dev.getName then
|
if dev.getName then
|
||||||
local name = dev.getName()
|
local name
|
||||||
|
pcall(function()
|
||||||
|
name = dev.getName()
|
||||||
|
end)
|
||||||
|
if name then
|
||||||
if dev.getInventory then
|
if dev.getInventory then
|
||||||
createDevice(name .. ':inventory', 'inventory', 'getInventory', dev)
|
createDevice(name .. ':inventory', 'inventory', 'getInventory', dev)
|
||||||
end
|
end
|
||||||
@ -168,6 +172,7 @@ drivers['manipulator'] = function(dev)
|
|||||||
|
|
||||||
return dev._children
|
return dev._children
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- initialize drivers
|
-- initialize drivers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user