1
0
mirror of https://github.com/kepler155c/opus synced 2025-01-26 07:06:52 +00:00

manipulator :(

This commit is contained in:
kepler155c@gmail.com 2018-12-02 15:10:21 -05:00
parent c5a821f264
commit 2517612622

View File

@ -154,18 +154,20 @@ local function createDevice(name, devType, method, manipulator)
end
drivers['manipulator'] = function(dev)
local name = dev.getName()
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
if dev.getName then
local name = dev.getName()
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
return dev._children
end
end
-- initialize drivers