rename symbol because idk what else to do
This commit is contained in:
10
main.lua
10
main.lua
@@ -62,15 +62,15 @@ Config.Monitors.AutopilotControlMonitor = nil
|
|||||||
|
|
||||||
function identifyMonitor(monitorType)
|
function identifyMonitor(monitorType)
|
||||||
-- Find all available monitors
|
-- Find all available monitors
|
||||||
local availableMonitors = peripheral.find("monitor")
|
local monitors = peripheral.find("monitor")
|
||||||
|
|
||||||
if not availableMonitors or #availableMonitors == 0 then
|
if not monitors or #monitors == 0 then
|
||||||
print("No monitors found on the network.")
|
print("No monitors found on the network.")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
print("Available monitors:")
|
print("Available monitors:")
|
||||||
for i, name in ipairs(availableMonitors) do
|
for i, name in ipairs(monitors) do
|
||||||
local monitor = peripheral.wrap(name)
|
local monitor = peripheral.wrap(name)
|
||||||
if monitor then
|
if monitor then
|
||||||
local width, height = monitor.getSize()
|
local width, height = monitor.getSize()
|
||||||
@@ -84,12 +84,12 @@ function identifyMonitor(monitorType)
|
|||||||
local input = read()
|
local input = read()
|
||||||
local choice = tonumber(input)
|
local choice = tonumber(input)
|
||||||
|
|
||||||
if not choice or choice < 1 or choice > #availableMonitors then
|
if not choice or choice < 1 or choice > #monitors then
|
||||||
print("Invalid selection.")
|
print("Invalid selection.")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local selectedMonitorName = availableMonitors[choice]
|
local selectedMonitorName = monitors[choice]
|
||||||
local selectedMonitor = peripheral.wrap(selectedMonitorName)
|
local selectedMonitor = peripheral.wrap(selectedMonitorName)
|
||||||
|
|
||||||
print("Selected monitor: " .. selectedMonitorName)
|
print("Selected monitor: " .. selectedMonitorName)
|
||||||
|
|||||||
Reference in New Issue
Block a user