1.7.10 compatibility

This commit is contained in:
kepler155c@gmail.com 2018-02-24 09:38:02 -05:00
parent fc9981bff0
commit daed3aac38
1 changed files with 2 additions and 5 deletions

View File

@ -54,11 +54,8 @@ function Peripheral.addDevice(deviceList, side)
name = uniqueName
end
local s, m = pcall(function() deviceList[name] = Peripheral.wrap(side) end)
if not s and m then
_G.printError('wrap failed')
_G.printError(m)
end
-- this can randomly fail
pcall(function() deviceList[name] = Peripheral.wrap(side) end)
if deviceList[name] then
Util.merge(deviceList[name], {