diff --git a/data/lib/index.ts b/data/lib/index.ts index 624b9741..6f6e3987 100644 --- a/data/lib/index.ts +++ b/data/lib/index.ts @@ -19,7 +19,7 @@ export type SpecieEntry = { export type ItemEntry = { type : 'item', sid : string, - name : string + names : string[] }; export type Entry = SpecieEntry | ItemEntry; diff --git a/ps-items.sheet.mjs b/ps-items.sheet.mjs index a6f2e643..dd6e6756 100644 --- a/ps-items.sheet.mjs +++ b/ps-items.sheet.mjs @@ -529,11 +529,13 @@ const ITEMS = { const found = new Map; -for (const {type, sid, name} of spritedata.entries()) { +for (const {type, sid, names} of spritedata.entries()) { if (type !== 'item') continue; - const id = toPSID(name); - const filename = spritedata.formatFilename({id: sid}); - found.set(id, path.join(root, "newsrc/minisprites/items", filename + ".png")); + for (let name of names) { + const id = toPSID(name); + const filename = spritedata.formatFilename({id: sid}); + found.set(id, path.join(root, "newsrc/minisprites/items", filename + ".png")); + } } const entries = []; diff --git a/smogon.deploy.js b/smogon.deploy.js index ee4a1097..44ea2003 100644 --- a/smogon.deploy.js +++ b/smogon.deploy.js @@ -38,8 +38,10 @@ function spritecopy(f, {dir, ext}) { function itemspritecopy(f, {dir, ext}) { const sn = spritedata.parseFilename(f.name); const sd = spritedata.get(sn.id); - const name = toSmogonAlias(sd.name); - copy(f, {dir, ext, name}); + for (const n of sd.names) { + const name = toSmogonAlias(n); + copy(f, {dir, ext, name}); + } } for (const f of list("newsrc/models")) {