build & deploy item forumsprites

This commit is contained in:
Christopher Monsanto
2020-08-31 08:52:59 -04:00
parent 74f5bef607
commit 78c264ad52
2 changed files with 23 additions and 1 deletions

View File

@@ -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(

View File

@@ -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"});
}