1
0
Fork 0
mirror of https://fem.mint.lgbt/m/Rhythmblock.git synced 2024-08-14 20:27:11 +00:00

removed some "== true" from it statments

This commit is contained in:
mint 2021-05-07 14:57:13 -04:00
parent c0df7011e5
commit 0da7d16bc0

View file

@ -72,7 +72,7 @@ end
function ejectDisc() -- Ejects the disc! How cool is that? function ejectDisc() -- Ejects the disc! How cool is that?
term.clear() term.clear()
buttonRender(false) buttonRender(false)
if playing == true then if playing then
stopDisc() stopDisc()
disk.eject() disk.eject()
elseif disk.isPresent(drive) then -- If there's a disc, it'll be ejected. 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 end
function buttonRender(play) -- Render some buttons depending if the computer is advanced or not function buttonRender(play) -- Render some buttons depending if the computer is advanced or not
if play == true then if play then
renderStopButton() renderStopButton()
else else
renderPlayButton() 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 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 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() stopDisc()
else else
playDisc() playDisc()
@ -163,7 +163,7 @@ while true do
elseif event == "key_up" then -- Same order but now with keys elseif event == "key_up" then -- Same order but now with keys
local name = keys.getName(eventData[2]) or "unknown key" local name = keys.getName(eventData[2]) or "unknown key"
if name == "space" then if name == "space" then
if playing == true then if playing then
stopDisc() stopDisc()
else else
playDisc() playDisc()