1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-25 04:37:40 +00:00
This commit is contained in:
kepler155c@gmail.com
2017-10-08 17:45:01 -04:00
parent 98ec840db1
commit a625b52bad
46 changed files with 334 additions and 319 deletions

View File

@@ -1,9 +1,15 @@
requireInjector(getfenv(1))
_G.requireInjector()
local Event = require('event')
local Peripheral = require('peripheral')
local Util = require('util')
local colors = _G.colors
local device = _G.device
local multishell = _ENV.multishell
local os = _G.os
local term = _G.term
multishell.setTitle(multishell.getCurrent(), 'Devices')
local attachColor = colors.green
@@ -14,7 +20,7 @@ if not term.isColor() then
detachColor = colors.lightGray
end
Event.on('peripheral', function(event, side)
Event.on('peripheral', function(_, side)
if side then
local dev = Peripheral.addDevice(device, side)
if dev then
@@ -25,7 +31,7 @@ Event.on('peripheral', function(event, side)
end
end)
Event.on('peripheral_detach', function(event, side)
Event.on('peripheral_detach', function(_, side)
if side then
local dev = Util.find(device, 'side', side)
if dev then

View File

@@ -1,6 +1,6 @@
if device.wireless_modem then
requireInjector(getfenv(1))
_G.requireInjector()
local Config = require('config')
local config = { }

View File

@@ -1,14 +1,17 @@
requireInjector(getfenv(1))
_G.requireInjector()
local Terminal = require('terminal')
local Util = require('util')
local multishell = _ENV.multishell
local os = _G.os
local term = _G.term
multishell.setTitle(multishell.getCurrent(), 'Debug')
term.redirect(Terminal.scrollable(term.current(), 50))
local tabId = multishell.getCurrent()
local tab = multishell.getTab(tabId)
local terminal = term.current()
local previousId