Add Andesite Alloy factory controller

This commit is contained in:
2026-07-17 01:19:19 +02:00
parent a0302d764d
commit 8ea978196e
5 changed files with 399 additions and 0 deletions
+9
View File
@@ -27,8 +27,10 @@ for _, name in ipairs(names) do
writeLine("Methods: " .. table.concat(methods, ", "))
local hasBlockData = false
local hasInventoryList = false
for _, method in ipairs(methods) do
if method == "getBlockData" then hasBlockData = true end
if method == "list" then hasInventoryList = true end
end
if hasBlockData then
@@ -36,6 +38,13 @@ for _, name in ipairs(names) do
writeLine("getBlockData OK: " .. tostring(ok))
writeLine(ok and textutils.serialize(data) or tostring(data))
end
if hasInventoryList then
local okSize, size = pcall(peripheral.call, name, "size")
local okList, items = pcall(peripheral.call, name, "list")
writeLine("Inventory size: " .. (okSize and tostring(size) or "ERROR"))
writeLine("Inventory list OK: " .. tostring(okList))
writeLine(okList and textutils.serialize(items) or tostring(items))
end
writeLine("")
end