mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-02 14:02:37 +00:00
* feat(signatures): Add custom info to system signatures * feat(connections): Add custom info to system connections * feat(Map): Add system signature type * feat(Map): Update wormhole types info * feat(Map): Add undo action for removed systems * feat(Map): Delete systems on Backspace hotkey * feat(Map): Update k-space systems background & styles * feat(Map): Update systems status background styles * feat(Map): add support for new wh type data. add signatures settings modal menu; reworked signatures widget - was added info of wormhole; --------- Co-authored-by: achichenkov <aleksei.chichenkov@telleqt.ai>
15 lines
491 B
TypeScript
15 lines
491 B
TypeScript
import { WORMHOLES_ADDITIONAL_INFO } from '@/hooks/Mapper/components/map/constants.ts';
|
|
import { WormholeDataRaw } from '@/hooks/Mapper/types';
|
|
|
|
export const sortWHClasses = (wormholesData: Record<string, WormholeDataRaw>, statics: string[]) => {
|
|
if (!statics) {
|
|
return [];
|
|
}
|
|
|
|
return statics
|
|
.map(x => wormholesData[x])
|
|
.map(x => ({ name: x.name, ...WORMHOLES_ADDITIONAL_INFO[x.dest] }))
|
|
.sort((a, b) => a.wormholeClassID - b.wormholeClassID)
|
|
.map(x => x.name);
|
|
};
|