From 0da7d16bc04e8eb52ae64228ca2463885fdac8da Mon Sep 17 00:00:00 2001 From: mint Date: Fri, 7 May 2021 14:57:13 -0400 Subject: [PATCH] removed some "== true" from it statments --- rhythmblock.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rhythmblock.lua b/rhythmblock.lua index 8c424de..3626af6 100644 --- a/rhythmblock.lua +++ b/rhythmblock.lua @@ -72,7 +72,7 @@ end function ejectDisc() -- Ejects the disc! How cool is that? term.clear() buttonRender(false) - if playing == true then + if playing then stopDisc() disk.eject() elseif disk.isPresent(drive) then -- If there's a disc, it'll be ejected. @@ -118,7 +118,7 @@ function renderCloseButton() -- Renders the Close button end function buttonRender(play) -- Render some buttons depending if the computer is advanced or not - if play == true then + if play then renderStopButton() else renderPlayButton() @@ -148,7 +148,7 @@ while true do if event == "mouse_up" then -- If the event triggered is the mouse clicking it'll do what's next if eventData[2] == 1 and eventData[3] >= centerWidth - 4 and eventData[4] >= centerHeight - 4 and eventData[3] <= centerWidth + 4 and eventData[4] <= centerHeight + 2 then -- If the user clicks on the play/stop button it'll begin playing the disc - if playing == true then + if playing then stopDisc() else playDisc() @@ -163,7 +163,7 @@ while true do elseif event == "key_up" then -- Same order but now with keys local name = keys.getName(eventData[2]) or "unknown key" if name == "space" then - if playing == true then + if playing then stopDisc() else playDisc()