crafter bug fixes

This commit is contained in:
kepler155c
2018-02-23 12:44:52 -05:00
parent f253afd221
commit 77b2632f3f

View File

@@ -448,14 +448,16 @@ local function findMachines()
dock() dock()
local function getName(side) local function getName(side)
local p = Peripheral.getBySide(side) local methods = Peripheral.isPresent(side) and Util.transpose(Peripheral.getMethods(side))
if p and p.getMetadata then if methods then
local name = p.getMetadata().displayName if methods.getMetadata then
if name and not string.find(name, '.', 1, true) then local name = Peripheral.getMetadata().displayName
return name if name and not string.find(name, '.', 1, true) then
return name
end
elseif methods.getInventoryName then -- 1.7x
return Peripheral.call(side, 'getInventoryName')
end end
elseif p and p.getInventoryName then -- 1.7x
return p.getInventoryName()
end end
end end