#!/usr/bin/env bash
# Run Godot headless against game/ (tests, imports, scripted tools).
#
# Uses a private copy of the pinned binary in ~/.cache/mightyweenie with its own
# ._sc_ marker, so headless runs never write the desktop editor's settings
# (tools/godot/editor_data) or the machine-wide ~/.config/godot. Works in a
# plan's worktree too (mw_godot_headless: the main checkout's binary); MW_GODOT
# names another binary.
source "$(dirname "${BASH_SOURCE[0]}")/_common.sh"
bin="$(mw_godot_headless)" || exit 1
exec "$bin" --headless --path "$MW_ROOT/game" "$@"
