From 741fad1f225c17e37d185931a332b4c1af8b46bf Mon Sep 17 00:00:00 2001 From: Dystroyer8 Date: Sat, 18 Jul 2026 00:57:20 +0200 Subject: [PATCH] Keep factory debug output off the monitor --- create_factory_debug.lua | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/create_factory_debug.lua b/create_factory_debug.lua index 4b0d87a..4ce91fb 100644 --- a/create_factory_debug.lua +++ b/create_factory_debug.lua @@ -132,8 +132,6 @@ local readMethods = { "stock", } -local monitorName = nil - for peripheralIndex, name in ipairs(names) do local methods = peripheral.getMethods(name) or {} table.sort(methods) @@ -145,12 +143,6 @@ for peripheralIndex, name in ipairs(names) do emit("Type(s): " .. table.concat(types, ", ")) emit("Methods (" .. tostring(#methods) .. "): " .. table.concat(methods, ", ")) - for _, peripheralType in ipairs(types) do - if peripheralType == "monitor" and monitorName == nil then - monitorName = name - end - end - for _, method in ipairs(readMethods) do if hasMethod(methods, method) then local ok, value = safeRead(name, method) @@ -171,29 +163,6 @@ file.write(table.concat(lines, "\n")) file.write("\n") file.close() -if monitorName then - local monitor = peripheral.wrap(monitorName) - monitor.setBackgroundColor(colors.black) - monitor.setTextColor(colors.white) - monitor.setTextScale(0.5) - monitor.clear() - - local width, height = monitor.getSize() - local function centered(row, text, color) - if row < 1 or row > height then - return - end - monitor.setTextColor(color or colors.white) - monitor.setCursorPos(math.max(1, math.floor((width - #text) / 2) + 1), row) - monitor.write(text:sub(1, width)) - end - - centered(math.max(1, math.floor(height / 2) - 2), "CREATE FACTORY DEBUG", colors.cyan) - centered(math.max(1, math.floor(height / 2)), "DUMP COMPLETE", colors.lime) - centered(math.max(1, math.floor(height / 2) + 1), tostring(#names) .. " peripherals found", colors.white) - centered(math.max(1, math.floor(height / 2) + 3), OUTPUT_FILE, colors.lightGray) -end - print("") print("Debug complete.") print("Created: " .. OUTPUT_FILE)