mirror of
https://github.com/smogon/sprites.git
synced 2026-12-05 07:00:37 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user