diff --git a/inventoryManager.lua b/inventoryManager.lua index 5c026a3..09a5ef9 100644 --- a/inventoryManager.lua +++ b/inventoryManager.lua @@ -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()