From 2e64a3200f4e15796345523178d5b2570dc47412 Mon Sep 17 00:00:00 2001 From: hkc Date: Fri, 20 Oct 2023 02:36:36 +0300 Subject: [PATCH] Be clear that it's a dummy Just don't print stuff to a terminal that is not here --- mess/tmpc.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mess/tmpc.lua b/mess/tmpc.lua index 3e00dd2..dbcef7e 100644 --- a/mess/tmpc.lua +++ b/mess/tmpc.lua @@ -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,