From deda0bb2ec4949f383d9292961ef99ba1c20bc3c Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Fri, 29 Mar 2024 09:49:35 +0000 Subject: [PATCH] Revert speaker play argument fix Already cherry-picked in a version of this. --- .../data/computercraft/lua/rom/programs/fun/speaker.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/speaker.lua b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/speaker.lua index b0da143b1..cee07b714 100644 --- a/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/speaker.lua +++ b/projects/core/src/main/resources/data/computercraft/lua/rom/programs/fun/speaker.lua @@ -49,10 +49,6 @@ elseif cmd == "play" then local speaker = get_speakers(name)[1] - if not file then - error("Usage: speaker play [speaker]", 0) - end - local handle, err if http and file:match("^https?://") then print("Downloading...") @@ -167,8 +163,9 @@ elseif cmd == "sound" then local speaker = get_speakers(name)[1] if speaker.playSound(sound, volume, pitch) then - print(("Played sound %q on speaker %q with volume %s and pitch %s."):format(sound, peripheral.getName(speaker), - volume or 1, pitch or 1)) + print(("Played sound %q on speaker %q with volume %s and pitch %s."):format( + sound, peripheral.getName(speaker), volume or 1, pitch or 1 + )) else error(("Could not play sound %q"):format(sound), 0) end