Sigs character name (#182)

* feat(Signatures): Added character names
This commit is contained in:
Dmitry Popov
2025-02-18 21:12:46 +04:00
committed by GitHub
parent 60697a50c2
commit 6d67f87d4b
15 changed files with 280 additions and 172 deletions

View File

@@ -2,12 +2,13 @@ import { WORMHOLES_ADDITIONAL_INFO } from '@/hooks/Mapper/components/map/constan
import { WormholeDataRaw } from '@/hooks/Mapper/types';
export const sortWHClasses = (wormholesData: Record<string, WormholeDataRaw>, statics: string[]) => {
if (!statics) {
if (!statics || !wormholesData) {
return [];
}
return statics
.map(x => wormholesData[x])
.filter(x => !!x)
.map(x => ({ name: x.name, ...WORMHOLES_ADDITIONAL_INFO[x.dest] }))
.sort((a, b) => a.wormholeClassID - b.wormholeClassID)
.map(x => x.name);