Drop the Alcremie sweets again
Serving alcremie-caramel-swirl-berry is not the same as anything asking for it, and nothing does. PS's pokedex.js gives Alcremie 8 cosmetic formes, cream only, and the dex reads no cosmetic forme at all: dex.pokemon_cosmetic_formes is filled on import and then read by nothing under dex/, so the site never composes one of these names. The only list of the 54 is chatot's, hardcoded in chatot/src/helpers/constants.ts under "COSMETIC FORMES", and chatot asks play.pokemonshowdown.com first and falls back to smogon.com only on a 404, which for these never comes, because PS serves all 54 itself. So the 62 files on the server are read by nothing, and pulling them in was the sync-from-the-server-for-its-own-sake this was meant to avoid. They join the backlog the deploy clears. The -k axis goes with them: nothing else needed a cosmetic to publish, and the grammar should not carry an axis on the strength of one set of files nobody reads. xy/ is 1651 names, and the backlog coverage.ts accounts for grows from 97 to 151. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@@ -4,8 +4,8 @@
|
||||
//
|
||||
// kind s specie, i item, x literal (Egg, Substitute, ...)
|
||||
// name the encoded name, [a-z0-9_]+
|
||||
// flags -o forme -k cosmetic -b back -s shiny -a asymmetrical
|
||||
// -f female -g gmax or -g<game> -v<vendor> -c<slot>
|
||||
// flags -o forme -b back -s shiny -a asymmetrical -f female
|
||||
// -g gmax or -g<game> -v<vendor> -c<slot>
|
||||
//
|
||||
// A name is encoded rather than spelled, because the two places these sprites
|
||||
// are published disagree about what a word boundary is: smogon writes
|
||||
@@ -48,23 +48,12 @@ export function psid(e: string): string {
|
||||
|
||||
// A published name: the name and its forme joined with a dash, then the
|
||||
// variant flags, which both sides spell the same way.
|
||||
//
|
||||
// A cosmetic is its own component rather than part of the forme, because the
|
||||
// two readings disagree about where a forme's words divide but not about the
|
||||
// boundary in front of the cosmetic. Alcremie's cream is `caramel-swirl` for
|
||||
// smogon and `caramelswirl` for PS, while its sweet is `-berry` for both; fold
|
||||
// the sweet into the forme and whichever reading you spell it for, the other
|
||||
// one comes out wrong.
|
||||
export function publishedName(sn: SpriteFilename, part: (e: string) => string): string {
|
||||
let name = part(sn.name);
|
||||
let forme = sn.extra.get('o');
|
||||
if (forme) {
|
||||
name += `-${part(forme)}`;
|
||||
}
|
||||
let cosmetic = sn.extra.get('k');
|
||||
if (cosmetic) {
|
||||
name += `-${part(cosmetic)}`;
|
||||
}
|
||||
if (sn.extra.has('f')) {
|
||||
name += '-f';
|
||||
}
|
||||
@@ -134,25 +123,19 @@ export function parseFilename(s: string): SpriteFilename {
|
||||
return {kind, name: first.slice(1), extra};
|
||||
}
|
||||
|
||||
// The flags publishedName() spells into the name, in the order it spells them.
|
||||
const NAME_PARTS = ['o', 'k'];
|
||||
|
||||
export function formatFilename(si: InputSpriteFilename): string {
|
||||
let s = `${si.kind}${si.name}`;
|
||||
|
||||
// The parts of the name lead, in the order they are published, so a
|
||||
// forme's whole set of sprites sorts together instead of interleaving with
|
||||
// the base forme's by flag letter.
|
||||
for (let k of NAME_PARTS) {
|
||||
let v = si.extra?.get(k);
|
||||
if (v !== undefined) {
|
||||
s += `-${k}${v}`;
|
||||
}
|
||||
// The forme leads, so a forme's whole set of sprites sorts together
|
||||
// instead of interleaving with the base forme's by flag letter.
|
||||
let forme = si.extra?.get('o');
|
||||
if (forme !== undefined) {
|
||||
s += `-o${forme}`;
|
||||
}
|
||||
|
||||
let extra = [];
|
||||
for (let [k, v] of si.extra?.entries() ?? []) {
|
||||
if (!NAME_PARTS.includes(k)) {
|
||||
if (k !== 'o') {
|
||||
extra.push(`-${k}${v}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 102 KiB |
@@ -31,14 +31,16 @@ let STAMPED = /-[A-Z2-7]{8}\.[a-z0-9]+$/;
|
||||
// The cap spellings, hoopa-alt and darmanitan-zen-galar predate PS's renames
|
||||
// to Pikachu-Alola, Hoopa-Unbound and Darmanitan-Galar-Zen, all of which the
|
||||
// build publishes; nothing in smogon.com or forum names the old ones. The
|
||||
// strawberry sweet is spelled as the bare cream both upstream and in chatot's
|
||||
// list. The pngs are shadowed by the gifs the build ships. The subdirectories
|
||||
// are XY-era scratch that no build has ever written.
|
||||
// Alcremie sweets are cosmetic formes PS's data does not carry, so the dex
|
||||
// never names one either; the only list of them is chatot's, and chatot reads
|
||||
// play.pokemonshowdown.com first and only falls back here on a 404, which for
|
||||
// these never happens. The pngs are shadowed by the gifs the build ships. The
|
||||
// subdirectories are XY-era scratch that no build has ever written.
|
||||
let BACKLOG = [
|
||||
/^(\.gitignore|manifest\.json)$/,
|
||||
/^pikachu-(kanto|hoenn|sinnoh|unova|kalos|alola)cap\.gif$/,
|
||||
/^(hoopa-alt|darmanitan-zen-galar)\.(gif|png)$/,
|
||||
/^alcremie-[a-z-]+-strawberry\.gif$/,
|
||||
/^alcremie-[a-z-]+-(berry|clover|flower|love|ribbon|star|strawberry)\.gif$/,
|
||||
/^(lokix|melmetal|meltan|pawmi|quaquaval|syclant)\.png$/,
|
||||
/^(aback|afront|asback|asfront|back|mini|sback|sfront)\//,
|
||||
];
|
||||
|
||||