builder improvements

This commit is contained in:
kepler155c@gmail.com
2017-06-23 02:04:56 -04:00
parent 3f66a9397c
commit 7f99c0c69a
20 changed files with 2827 additions and 675 deletions

View File

@@ -51,13 +51,15 @@ function Peripheral.addDevice(deviceList, side)
end
deviceList[name] = peripheral.wrap(side)
Util.merge(deviceList[name], {
name = name,
type = ptype,
side = side,
})
if deviceList[name] then
Util.merge(deviceList[name], {
name = name,
type = ptype,
side = side,
})
return deviceList[name]
return deviceList[name]
end
end
function Peripheral.getBySide(side)