#!/usr/bin/env python3 """Verify every Filename: referenced by the mod's sequence yaml actually exists. check-yaml does NOT do this — missing sprites only surface as a FileNotFoundException when a map loads. Run this after adding art. Exits non-zero on any miss. """ import os, re, sys, glob MOD = os.path.join(os.path.dirname(__file__), '..', 'mods', 'vinylgod') missing = [] checked = 0 for y in glob.glob(os.path.join(MOD, 'sequences', '*.yaml')): for i, line in enumerate(open(y), 1): m = re.search(r'Filename:\s*(\S+)', line) if not m: continue checked += 1 p = os.path.join(MOD, m.group(1)) if not os.path.exists(p): missing.append(f'{os.path.basename(y)}:{i} {m.group(1)}') print(f'checked {checked} sprite references') if missing: print(f'MISSING {len(missing)}:') for m in missing: print(' ' + m) sys.exit(1) print('all sprite files present')