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:
parent
f1984c16ea
commit
bffe4e088a
@ -268,6 +268,7 @@ garage:
|
||||
|
||||
waxseed:
|
||||
BodyOrientation:
|
||||
QuantizeFacingsFromSequence:
|
||||
RenderSprites:
|
||||
WithSpriteBody:
|
||||
Interactable:
|
||||
|
||||
BIN
mods/vinylgod/sequences/assets/icon_boombike.png
Normal file
BIN
mods/vinylgod/sequences/assets/icon_boombike.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
mods/vinylgod/sequences/assets/icon_compressor.png
Normal file
BIN
mods/vinylgod/sequences/assets/icon_compressor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
mods/vinylgod/sequences/assets/icon_crawler.png
Normal file
BIN
mods/vinylgod/sequences/assets/icon_crawler.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
mods/vinylgod/sequences/assets/icon_flyer45.png
Normal file
BIN
mods/vinylgod/sequences/assets/icon_flyer45.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
28
tools/check_assets.py
Normal file
28
tools/check_assets.py
Normal 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')
|
||||
Loading…
Reference in New Issue
Block a user