monitor manager

This commit is contained in:
kepler155c
2017-09-23 21:46:46 -04:00
parent f0f8ba0729
commit 2b1b04d764
4 changed files with 201 additions and 76 deletions

View File

@@ -6,11 +6,14 @@ local Socket = require('socket')
Logger.setScreenLogging()
local mon = term.current()
local args = { ... }
local mon = device[args[1] or 'monitor']
if args[1] then
mon = device[args[1]]
end
if not mon then
error('Monitor not attached')
error('Invalid monitor')
end
mon.setBackgroundColor(colors.black)