Working on dialog editor, on dialogs, on phone
This commit is contained in:
1 parent
0e27521bea
commit
8f7797789d
63 files changed
+9502
-1459
No files matched your search
@@ -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}`;
|
||||
}
|
||||
Reference in new issue
Block a user