1
0
mirror of https://github.com/kepler155c/opus synced 2025-01-23 21:56:53 +00:00

manipulator device :(

This commit is contained in:
kepler155c@gmail.com 2018-12-21 20:58:41 -05:00
parent e14a71ab6a
commit 3de03bef22

View File

@ -155,23 +155,22 @@ end
drivers['manipulator'] = function(dev)
if dev.getName then
local name
pcall(function()
name = dev.getName()
end)
if name then
if dev.getInventory then
createDevice(name .. ':inventory', 'inventory', 'getInventory', dev)
end
if dev.getEquipment then
createDevice(name .. ':equipment', 'equipment', 'getEquipment', dev)
end
if dev.getEnder then
createDevice(name .. ':enderChest', 'enderChest', 'getEnder', dev)
end
local name = dev.getName()
if name then
if dev.getInventory then
createDevice(name .. ':inventory', 'inventory', 'getInventory', dev)
end
if dev.getEquipment then
createDevice(name .. ':equipment', 'equipment', 'getEquipment', dev)
end
if dev.getEnder then
createDevice(name .. ':enderChest', 'enderChest', 'getEnder', dev)
end
return dev._children
end
return dev._children
end
end)
end
end