Fix two runtime-only bugs found on first live run: missing sidebar icons for the 4 facing-sheet units, and waxseed needing QuantizeFacingsFromSequence

Adds tools/check_assets.py — check-yaml does NOT resolve sprite file paths, so a
missing PNG only crashes at map load. This catches it statically.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-07-25 22:20:38 +10:00
parent f1984c16ea
commit bffe4e088a
6 changed files with 29 additions and 0 deletions

View File

@ -268,6 +268,7 @@ garage:
waxseed:
BodyOrientation:
QuantizeFacingsFromSequence:
RenderSprites:
WithSpriteBody:
Interactable:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

28
tools/check_assets.py Normal file
View File

@ -0,0 +1,28 @@
#!/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')