#!/usr/bin/env bash
# Headless dedicated peer for hyper-tps
# Usage: bash run_bot.sh <room-name> [--role peer]
# bash run_bot.sh --list-rooms
# Player name always comes from Keet identity.
# Remote: ssh tabertron "cd ~/projects/code/godot/hyper-tps && bash run_bot.sh --list-rooms"
if [ "$1" = "--list-rooms" ]; then
exec godot4 --headless --path "$(dirname "$0")" -- --list-rooms
fi
ROOM="${1:?Usage: run_bot.sh <room-name> [--role Role] | run_bot.sh --list-rooms}"
shift
exec godot4 --headless --path "$(dirname "$0")" -- --room "$ROOM" "$@"