mirror of
https://github.com/smogon/sprites.git
synced 2026-12-05 07:00:37 -06:00
- casInsert verifies an existing object's bytes before trusting it, fsyncs before the rename, and the store records object sizes so a crash-truncated object reads as dirty instead of clean forever. - The driver hashes sources over the producer closure, so partial builds (inspect) that pull in producers outside the demanded set work. - Unknown executor errors are reported and abort the build instead of vanishing into allSettled. - %b/%B expand to nominal names at declaration (never CAS basenames), which also puts name-dependence in the identity key; cmds are key-joined with NUL so a multi-line command cannot collide with split commands. This churns every rule key once. - Rules must declare at least one output; output names reject shell-hostile characters. - run --link copies read-only (CAS) sources instead of hardlinking 0444 modes into deploy trees; ctx.list filters dotfiles and directories like the build-side glob; inspect resolves targets against the invoking cwd. - The registry dedupes identical declarations (same cmds/inputs/deps/ outputs/display), returning the existing artifacts, so shared rule sets are plain functions and memo() is gone; ps.deploy.ts no longer declares the gen5 gif set it never ships. - rule() returns a tuple typed by its literal output list (single string output returns the Artifact directly), so destructuring needs no non-null assertions. - Manifest is a class carrying the deploy ctx: set() rejects duplicate keys, write(dst) emits the sorted JSON, and spritecopy/itemspritecopy/ stampcopy take just the manifest. The unstamped smogon sets (xyitems, fbsprites, twittersprites) are deprecated and commented out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
|
|
import {type Artifact, forEachRule} from '../tools/build/artifact.ts';
|
|
|
|
// Gen 9
|
|
|
|
export function gen9Modelslike() : Artifact[] {
|
|
return forEachRule("src/gen9species/*.png", {
|
|
display: "96x96 %f",
|
|
// TODO, add customizable compression for gif
|
|
// ... or investigate using webp instead of both png/gif here
|
|
cmds: [
|
|
"magick convert %f -trim +repage -resize 90x90 %o",
|
|
"gifsicle -O3 -b %o",
|
|
],
|
|
}, "%B.gif");
|
|
}
|
|
|
|
// Gen 10
|
|
|
|
export function gen10Modelslike() : Artifact[] {
|
|
return forEachRule("src/champions/*.png", {
|
|
display: "96x96 %f",
|
|
// TODO, add customizable compression for gif
|
|
// ... or investigate using webp instead of both png/gif here
|
|
cmds: [
|
|
"magick convert %f -trim +repage -resize 90x90 %o",
|
|
"gifsicle -O3 -b %o",
|
|
],
|
|
}, "%B.gif");
|
|
}
|
|
|
|
// Gen 5 CAPs...
|
|
|
|
export function gen5Gifs() : Artifact[] {
|
|
return forEachRule("src/sprites/gen5/*.png", [
|
|
// TODO, add customizable compression for gif
|
|
// ... or investigate using webp instead of both png/gif here
|
|
"magick convert %f %o",
|
|
"gifsicle -O3 -b %o",
|
|
], "%B.gif");
|
|
}
|