Wrap peripheral if string is given instead of table
This commit is contained in:
parent
3dabc55825
commit
742f8eb81d
@ -108,6 +108,10 @@ local metatable = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function localchest.fromPeripheral(per)
|
function localchest.fromPeripheral(per)
|
||||||
|
if type(per) == "string" then
|
||||||
|
per = peripheral.wrap(per)
|
||||||
|
end
|
||||||
|
|
||||||
local chest = {
|
local chest = {
|
||||||
peripheral = per,
|
peripheral = per,
|
||||||
slots = {},
|
slots = {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user