1
0
Fork 0

Be clear that it's a dummy

Just don't print stuff to a terminal that is not here
This commit is contained in:
Casey 2023-10-20 02:36:36 +03:00
parent d657c1852d
commit 2e64a3200f
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 7 additions and 4 deletions

View File

@ -41,6 +41,7 @@ if not drive then
_pos = 0,
_fp = fp,
_state = "STOPPED",
isDummy = true,
seek = function(howMuch)
drive._pos = math.min(drive.getSize(), math.max(0, drive._pos + howMuch))
end,
@ -431,10 +432,12 @@ function()
end
end
elseif ev ~= "timer" then
local m = term.redirect(peripheral.wrap("right"))
io.write(ev .. " ")
pretty.print(pretty.pretty(evd))
term.redirect(m)
if drive.isDummy then
local m = term.redirect(peripheral.wrap("right"))
io.write(ev .. " ")
pretty.print(pretty.pretty(evd))
term.redirect(m)
end
end
end
end,