Be clear that it's a dummy
Just don't print stuff to a terminal that is not here
This commit is contained in:
parent
d657c1852d
commit
2e64a3200f
|
@ -41,6 +41,7 @@ if not drive then
|
||||||
_pos = 0,
|
_pos = 0,
|
||||||
_fp = fp,
|
_fp = fp,
|
||||||
_state = "STOPPED",
|
_state = "STOPPED",
|
||||||
|
isDummy = true,
|
||||||
seek = function(howMuch)
|
seek = function(howMuch)
|
||||||
drive._pos = math.min(drive.getSize(), math.max(0, drive._pos + howMuch))
|
drive._pos = math.min(drive.getSize(), math.max(0, drive._pos + howMuch))
|
||||||
end,
|
end,
|
||||||
|
@ -431,12 +432,14 @@ function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif ev ~= "timer" then
|
elseif ev ~= "timer" then
|
||||||
|
if drive.isDummy then
|
||||||
local m = term.redirect(peripheral.wrap("right"))
|
local m = term.redirect(peripheral.wrap("right"))
|
||||||
io.write(ev .. " ")
|
io.write(ev .. " ")
|
||||||
pretty.print(pretty.pretty(evd))
|
pretty.print(pretty.pretty(evd))
|
||||||
term.redirect(m)
|
term.redirect(m)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
function()
|
function()
|
||||||
while true do
|
while true do
|
||||||
|
|
Loading…
Reference in New Issue