milo: UI cleanup

This commit is contained in:
kepler155c
2018-11-13 21:31:27 -05:00
parent 38777041d1
commit 8e9ca385d9
11 changed files with 77 additions and 30 deletions

View File

@@ -49,13 +49,30 @@ for _, node in pairs(config.nodes) do
end
end
local function Syntax(msg)
print([[
Turtle must be equipped with:
* Introspection module
* Workbench
Turtle must be connected to:
* Wired modem
]])
error(msg)
end
local modem = Peripheral.get('wired_modem')
if not modem or not modem.getNameLocal then
error('Wired modem is not connected')
Syntax('Wired modem missing')
end
local introspection = Peripheral.get('plethora:introspection') or
error('Introspection module not found')
Syntax('Introspection module missing')
if not device.workbench then
Syntax('Workbench missing')
end
local context = {
config = config,