Give the social images every source the xy set has

Models and gen 9 species left 93 dex aliases without one: the Champions megas
are in src/champions and the CAPs and Gigantamax formes in src/sprites/gen5.
The social sets now layer the same sources as xy, first file name wins.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NapyguGQ2S5QKhY451edA4
This commit is contained in:
Christopher Monsanto
2026-10-25 23:25:06 -04:00
parent ff5609347c
commit 18fc3d83b8

View File

@@ -358,16 +358,19 @@ deploy(async ctx => {
manifest.write('__meta/pmd/manifest.json');
});
// Smogdex social images: models, backfilled with gen9 species not yet in
// models (first source wins).
// Smogdex social images: the xy set's sources, first source wins per file
// name, so everything the dex draws has one.
function socialInputs(): string[] {
let social = spriteglob(['src/models/*'], {b: false, s: false});
let socialSeen = new Set(social.map(base));
for (let file of spriteglob(['src/gen9species/*'], {b: false, s: false})) {
if (!socialSeen.has(base(file))) {
social.push(file);
socialSeen.add(base(file));
let social: string[] = [];
let seen = new Set<string>();
for (let pat of ['src/models/*', 'src/gen9species/*', 'src/champions/*',
'src/sprites/gen5/*.png', 'src/sprites/gen5/*.gif']) {
for (let file of spriteglob(pat, {b: false, s: false})) {
if (!seen.has(base(file))) {
social.push(file);
seen.add(base(file));
}
}
}
return social;