feat: build compact BO2 grind companion with cumulative ranks
Some checks failed
Test and deploy staging / staging (push) Failing after 2m50s
Some checks failed
Test and deploy staging / staging (push) Failing after 2m50s
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import weaponArt from '../../../../../data/cod-art.json';
|
||||
import rankArt from '../../../../../data/cod-rank-art.json';
|
||||
import images from '../../../../../data/game-images.json';
|
||||
import maps from '../../../../../data/pokemon-map-art.json';
|
||||
export function load() {
|
||||
const sources = new Map<string, { source: string; credit: string; count: number }>();
|
||||
for (const image of images) {
|
||||
for (const image of [...images, ...weaponArt, ...rankArt]) {
|
||||
const existing = sources.get(image.source);
|
||||
if (existing) existing.count++;
|
||||
else sources.set(image.source, { source: image.source, credit: image.credit, count: 1 });
|
||||
@@ -10,6 +12,6 @@ export function load() {
|
||||
return {
|
||||
sources: [...sources.values()],
|
||||
maps: Object.values(maps).map(({ name, source, credit }) => ({ name, source, credit })),
|
||||
total: images.length
|
||||
total: images.length + weaponArt.length + rankArt.length
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user