Wrap peripheral if string is given instead of table

This commit is contained in:
Gabriel Tofvesson 2025-05-15 18:03:59 +02:00
parent 3dabc55825
commit 742f8eb81d

View File

@ -108,6 +108,10 @@ local metatable = {
}
function localchest.fromPeripheral(per)
if type(per) == "string" then
per = peripheral.wrap(per)
end
local chest = {
peripheral = per,
slots = {},