diff --git a/Tupfile.lua b/Tupfile.lua index 0541ec65..e0ee4327 100644 --- a/Tupfile.lua +++ b/Tupfile.lua @@ -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( diff --git a/smogon.deploy.js b/smogon.deploy.js index 382dc7d5..1b3d842b 100644 --- a/smogon.deploy.js +++ b/smogon.deploy.js @@ -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"}); }