mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-11-25 02:26:29 +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>
28 lines
761 B
TypeScript
28 lines
761 B
TypeScript
import { COSMIC_SIGNATURE } from '@/hooks/Mapper/components/mapInterface/widgets/SystemSignatures/SystemSignatureSettingsDialog';
|
|
import { SystemSignature } from '@/hooks/Mapper/types';
|
|
|
|
export const parseSignatures = (value: string, availableKeys: string[]): SystemSignature[] => {
|
|
const outArr: SystemSignature[] = [];
|
|
const rows = value.split('\n');
|
|
|
|
for (let a = 0; a < rows.length; a++) {
|
|
const row = rows[a];
|
|
|
|
const sigArrInfo = row.split(' ');
|
|
|
|
if (sigArrInfo.length !== 6) {
|
|
continue;
|
|
}
|
|
|
|
outArr.push({
|
|
eve_id: sigArrInfo[0],
|
|
kind: availableKeys.includes(sigArrInfo[1]) ? sigArrInfo[1] : COSMIC_SIGNATURE,
|
|
group: sigArrInfo[2],
|
|
name: sigArrInfo[3],
|
|
type: '',
|
|
});
|
|
}
|
|
|
|
return outArr;
|
|
};
|