From 8dde3b3f3abcadcbdb3311135c3dc2bf362b531c Mon Sep 17 00:00:00 2001 From: byrongamatos Date: Mon, 13 Jul 2026 13:12:21 +0200 Subject: [PATCH] feat(career): crowd-SFX settings toggle + sfx/intro manifest validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings → System → Career panel with the 'Crowd sound reactions' toggle (writes the localStorage key the crowd layer reads). Pack manifests may carry sfx {up, down} mp3s, validated like intro files. Co-Authored-By: Claude Fable 5 --- plugins/career/plugin.json | 8 ++++++-- plugins/career/routes.py | 7 ++++--- plugins/career/settings.html | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 plugins/career/settings.html diff --git a/plugins/career/plugin.json b/plugins/career/plugin.json index 9f0550a..aeea61c 100644 --- a/plugins/career/plugin.json +++ b/plugins/career/plugin.json @@ -4,9 +4,13 @@ "version": "0.1.0", "bundled": true, "private": false, - "description": "Career mode — gig your way from a local bar to the arena. Earn stars per song; the crowd reacts to how you play.", + "description": "Career mode \u2014 gig your way from a local bar to the arena. Earn stars per song; the crowd reacts to how you play.", "screen": "screen.html", "script": "screen.js", "styles": "assets/career.css", - "routes": "routes.py" + "routes": "routes.py", + "settings": { + "html": "settings.html", + "category": "system" + } } diff --git a/plugins/career/routes.py b/plugins/career/routes.py index ef0fb20..91d7182 100644 --- a/plugins/career/routes.py +++ b/plugins/career/routes.py @@ -134,9 +134,10 @@ def _validate_pack_dir(pack_dir: Path): for name in (manifest.get("stingers") or {}).values(): if name and (not PACK_FILENAME_RE.fullmatch(name) or not (pack_dir / name).is_file()): raise ValueError(f"stinger file '{name}' invalid or missing") - for name in (manifest.get("intro") or {}).values(): - if name and (not PACK_FILENAME_RE.fullmatch(name) or not (pack_dir / name).is_file()): - raise ValueError(f"intro file '{name}' invalid or missing") + for block in ("intro", "sfx"): + for name in (manifest.get(block) or {}).values(): + if name and (not PACK_FILENAME_RE.fullmatch(name) or not (pack_dir / name).is_file()): + raise ValueError(f"{block} file '{name}' invalid or missing") def _download_pack(venue_id, pack, progress): diff --git a/plugins/career/settings.html b/plugins/career/settings.html new file mode 100644 index 0000000..483bce6 --- /dev/null +++ b/plugins/career/settings.html @@ -0,0 +1,21 @@ +
+ +
+