From 984754a891f9f3978314a105add01d397d92a0da Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Sat, 8 Feb 2020 01:02:16 -0500 Subject: [PATCH] Update wpath.lua --- wpath.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wpath.lua b/wpath.lua index 65c7dad..844969d 100644 --- a/wpath.lua +++ b/wpath.lua @@ -57,8 +57,8 @@ local render = function(shift,mon) line = bow:rep(scr_x):sub(1,scr_x) local text = ("#"):rep(scr_x) if wpath.doFlip then - txcol = wrap(line:reverse(), -1*math.abs(scr_y/2-y)+shift-1) - bgcol = wrap(line:reverse(), -1*math.abs(scr_y/2-y)+shift) + txcol = wrap(line:reverse(), math.abs(scr_y/2-y)+shift-1) + bgcol = wrap(line:reverse(), math.abs(scr_y/2-y)+shift) else txcol = wrap(line, -1*math.abs(y-scr_y/2)+shift-1) bgcol = wrap(line, -1*math.abs(y-scr_y/2)+shift) @@ -70,11 +70,15 @@ end local DOITNOW = function(KILLME, KILLMENOW) local shift = 0 while true do - shift = (shift + 1) + if wpath.doFlip then + shift = (shift - 1) + else + shift = (shift + 1) + end mons = {peripheral.find("monitor")} setscales() for a = 1, #mons do - render(shift,mons[a]) + render(shift, mons[a]) end sleep(wpath.delay) end