Skip to content

Commit 91e0d69

Browse files
committed
feat: add audio support to balatro.sh
- Add --audio flag to enable audio during gameplay - Set BALATROBOT_AUDIO=1 environment variable when audio is enabled - Update help text and examples to document audio option - Audio is disabled by default for performance
1 parent 94fa214 commit 91e0d69

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

balatro.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ declare -a INSTANCE_PIDS=()
66
declare -a FAILED_PORTS=()
77
HEADLESS=false
88
FAST=false
9+
AUDIO=false
910
FORCE_KILL=true
1011
KILL_ONLY=false
1112
STATUS_ONLY=false
@@ -38,6 +39,7 @@ Options:
3839
Default: 12346 if no port specified
3940
--headless Enable headless mode (sets BALATROBOT_HEADLESS=1)
4041
--fast Enable fast mode (sets BALATROBOT_FAST=1)
42+
--audio Enable audio (disabled by default, sets BALATROBOT_AUDIO=1)
4143
--kill Kill all running Balatro instances and exit
4244
--status Show information about running Balatro instances
4345
-h, --help Show this help message
@@ -47,6 +49,7 @@ Examples:
4749
$0 -p 12347 # Start single instance on port 12347
4850
$0 -p 12346 -p 12347 # Start two instances on ports 12346 and 12347
4951
$0 --headless --fast # Start with headless and fast mode on default port
52+
$0 --audio # Start with audio enabled on default port
5053
$0 --kill # Kill all running Balatro instances
5154
$0 --status # Show running instances
5255
@@ -77,6 +80,10 @@ parse_arguments() {
7780
FAST=true
7881
shift
7982
;;
83+
--audio)
84+
AUDIO=true
85+
shift
86+
;;
8087
--kill)
8188
KILL_ONLY=true
8289
shift
@@ -242,6 +249,9 @@ start_balatro_instance() {
242249
if [[ "$FAST" == "true" ]]; then
243250
export BALATROBOT_FAST=1
244251
fi
252+
if [[ "$AUDIO" == "true" ]]; then
253+
export BALATROBOT_AUDIO=1
254+
fi
245255

246256
# Set up platform-specific Balatro configuration
247257
# Platform-specific launch

0 commit comments

Comments
 (0)