Enhance monitor setup to support networked monitors and fallback for modem detection
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user