crafter bug fixes
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user