Working on dialog editor, on dialogs, on phone

This commit is contained in:
Vladislav Khorev committed 2026-06-05 21:17:51 +03:00
1 parent 0e27521bea
commit 8f7797789d
63 files changed
+9502 -1459

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { NodeType } from '../types/dialogue';
export function makeNodeId(type: NodeType, existingIds: Set<string>): string {
const base = type.toLowerCase();
let n = 1;
while (existingIds.has(`${base}_${n}`)) n++;
return `${base}_${n}`;
}
export function makeDialogueId(existingIds: Set<string>): string {
let n = 1;
while (existingIds.has(`dialog_new${n}`)) n++;
return `dialog_new${n}`;
}