mirror of
https://github.com/smogon/sprites.git
synced 2026-08-20 00:34:22 -05:00
build & deploy item forumsprites
This commit is contained in:
@@ -10,6 +10,15 @@ foreach_rule(
|
||||
"build/gen6-minisprites-padded/%b"
|
||||
)
|
||||
|
||||
foreach_rule(
|
||||
"newsrc/minisprites/items/*.png",
|
||||
{
|
||||
display="pad item minisprite %f",
|
||||
pad{w=24, h=24}
|
||||
},
|
||||
"build/item-minisprites-padded/%b"
|
||||
)
|
||||
|
||||
-- PS spritesheet
|
||||
|
||||
rule(
|
||||
|
||||
@@ -15,7 +15,8 @@ function spritecopy(f, {dir, ext}) {
|
||||
}
|
||||
|
||||
if (typeof sn.id === 'string') {
|
||||
name = toSmogonAlias(sn.id);
|
||||
// Skip this, we don't use Unknown/Substitute
|
||||
return;
|
||||
} else {
|
||||
const sd = spritedata.get(sn.id);
|
||||
name = toSmogonAlias(sd.base);
|
||||
@@ -33,10 +34,22 @@ function spritecopy(f, {dir, ext}) {
|
||||
copy(f, {dir, ext, name});
|
||||
}
|
||||
|
||||
// TODO: merge with above
|
||||
function itemspritecopy(f, {dir, ext}) {
|
||||
const sn = spritedata.parseFilename(f.name);
|
||||
const sd = spritedata.getItem(sn.id);
|
||||
const name = toSmogonAlias(sd.name);
|
||||
copy(f, {dir, ext, name});
|
||||
}
|
||||
|
||||
for (const f of list("build/gen6-minisprites-padded")) {
|
||||
spritecopy(f, {dir: "forumsprites"});
|
||||
}
|
||||
|
||||
for (const f of list("build/item-minisprites-padded")) {
|
||||
itemspritecopy(f, {dir: "forumsprites"});
|
||||
}
|
||||
|
||||
for (const f of list("build/smogon/fbsprites/xy")) {
|
||||
spritecopy(f, {dir: "fbsprites/xy"});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user