Verify original character pack hashes while allowing independent editorial covers
waterfall-wiki CI and deployment / verify-and-deploy (push) Successful in 17m46s
waterfall-wiki CI and deployment / verify-and-deploy (push) Successful in 17m46s
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user