1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-21 02:37:48 +00:00

mirror to monitor

This commit is contained in:
kepler155c@gmail.com
2017-04-08 20:06:31 -04:00
parent 430ab7d910
commit 60487d951d
5 changed files with 110 additions and 90 deletions

View File

@@ -1,7 +1,7 @@
local Logger = require('logger')
local socketClass = { }
local trustList
local trustList = Util.readTable('.known_hosts')
function socketClass:read(timeout)
@@ -218,6 +218,4 @@ function Socket.server(port, keepAlive)
end
end
trustList = Util.readTable('.known_hosts')
return Socket

View File

@@ -84,9 +84,7 @@ function Terminal.toGrayscale(ct)
for _,v in pairs(methods) do
local fn = ct[v]
ct[v] = function(c)
if scolors[c] then
fn(scolors[c])
end
fn(scolors[c])
end
end
@@ -107,9 +105,7 @@ function Terminal.toGrayscale(ct)
local function translate(s)
if s then
for k,v in pairs(bcolors) do
s = s:gsub(k, v)
end
s = s:gsub("%d+", bcolors)
end
return s
end
@@ -132,14 +128,14 @@ function Terminal.getNullTerm(ct)
return nt
end
function Terminal.copy(ot)
local ct = { }
for k,v in pairs(ot) do
function Terminal.copy(it, ot)
ot = ot or { }
for k,v in pairs(it) do
if type(v) == 'function' then
ct[k] = v
ot[k] = v
end
end
return ct
return ot
end
function Terminal.mirror(ct, dt)

View File

@@ -130,6 +130,7 @@ local function sendInfo()
info.point = turtle.point
info.inventory = turtle.getInventory()
info.coordSystem = turtle.getState().coordSystem
info.slotIndex = turtle.getSelectedSlot()
end
device.wireless_modem.transmit(999, os.getComputerID(), info)
end