mirror of
https://github.com/smogon/sprites.git
synced 2026-10-03 06:39:02 -05:00
src/ named 48442 sprites by a packed number, s<num*32 + formeNum> for species and i<num> for items, so s193-b-s.gif is Shiny Charizard-Mega-X's back sprite and there was no way to know that without looking it up in data/species.json. The table was the only thing making the tree navigable, and it existed only because the filenames were opaque. Put the name in the filename and the table has no job left, so this does both. A name is encoded rather than spelled: a run of non-alphanumerics becomes _ when it separates words and vanishes otherwise, decomposing first so accents are dropped on purpose rather than by accident of how the source spelled them. Recording where the words divide is what lets smogon read a name as ho-oh and PS read it as hooh off the same file, with nothing looking anything up. Formes ride in -o, which keeps the boundary the two readings differ across and groups a forme's sprites together under ls. s/i/x stay, so a directory can hold species and items with rules matching them apart, and so xatu isn't mistaken for an escape. The x escape's only other job was telling parseFilename not to resolve a name, which nothing does now. Where PS's own formeOrder gives one name to several of the games' forme slots, nothing tells them apart, so the lowest slot keeps the bare name and the rest carry -c: 16 files, all in previews/gen9. The three jobs the table had left, each somewhere narrower now: published names come off the filename; the 12 items that ship under a second name are a literal in data/lib; base-forme sheet slots moved to ps-pokemon.dexnums.mjs last commit. Nothing validates a filename any more, which get() used to do by throwing; tools/spritedata/names.ts prints what should exist so a directory can be checked against it. The smogon and ps deploys materialize byte for byte identically. assets moves five forumsprites keys, because toSmogonAlias was missing a /g and so dashed only the first space: deep-seascale, deep-seatooth, gold-bottlecap, prz-cureberry and psn-cureberry gain their missing dashes, and the sprite bytes behind them are unchanged. That bug cannot survive the encoding, which cannot tell which boundary came first. The smogdex sheet relaid out, since spritesmith packs in glob order; its 2117 css class names are identical. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQicnpaee6kQXGG7uVExLS
9 lines
144 B
JSON
9 lines
144 B
JSON
{
|
|
"name": "@smogon/sprite-data",
|
|
"private": true,
|
|
"type": "module",
|
|
"dependencies": {
|
|
"@types/node": "^24.10.7"
|
|
}
|
|
}
|