Enhance monitor setup to support networked monitors and fallback for modem detection

This commit is contained in:
MayaTheShy
2026-03-15 22:11:28 -04:00
parent b287cff75f
commit d8a08528b9

View File

@@ -131,6 +131,17 @@ local mon = nil
local function setupMonitor()
mon = peripheral.wrap(MONITOR_SIDE)
-- If the side has a modem instead of a direct monitor, find it by type
if mon and not mon.setTextScale then
mon = nil
end
if not mon then
-- Search for a monitor on the network
local name = peripheral.find("monitor")
if name then
mon = name
end
end
if not mon then return false end
mon.setTextScale(0.5)
mon.clear()