Allow wrapping a chest by type
This commit is contained in:
parent
3f0487bb48
commit
5fe4bc0c66
@ -6,7 +6,13 @@ Chest.__index = Chest
|
|||||||
-- Homogeneity allows chest scan to clone empty itemDetail slot to all empty slots in chest
|
-- Homogeneity allows chest scan to clone empty itemDetail slot to all empty slots in chest
|
||||||
function Chest:fromPeripheral(chest, homogeneous)
|
function Chest:fromPeripheral(chest, homogeneous)
|
||||||
if type(chest) == "string" then
|
if type(chest) == "string" then
|
||||||
chest = peripheral.wrap(chest)
|
local chestResult = peripheral.wrap(chest)
|
||||||
|
|
||||||
|
if chestResult == nil then
|
||||||
|
chestResult = peripheral.find(chest)
|
||||||
|
end
|
||||||
|
|
||||||
|
chest = chestResult
|
||||||
end
|
end
|
||||||
|
|
||||||
if chest == nil then
|
if chest == nil then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user