removed some "== true" from it statments

This commit is contained in:
mint 2021-05-07 14:57:13 -04:00
parent c0df7011e5
commit 0da7d16bc0
1 changed files with 4 additions and 4 deletions

View File

@ -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()