Verify original character pack hashes while allowing independent editorial covers
waterfall-wiki CI and deployment / verify-and-deploy (push) Successful in 17m46s

This commit is contained in:
2026-10-27 15:19:53 +08:00
parent 5f6d17283d
commit 939e002646
5 changed files with 21 additions and 9 deletions
@@ -0,0 +1,6 @@
/** Extra editorial covers are allowed; every original seed image must remain attached. */
export function requiredPackImages(hashes,images){
const remaining=[...images],originals=[];
for(const hash of hashes){const index=remaining.findIndex(image=>image.sha256===hash);if(index<0)throw Error('Original seed image missing from character pack');originals.push(...remaining.splice(index,1));}
return originals;
}