feat(npcs): drop binding; select NPCs on storyline export

Remove storyline/scene NPC binding and export chosen NPCs with relations/groups. Harden export modal so a missing npcs payload no longer blacks out the editor.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-30 10:05:09 +08:00
parent 04c75cd725
commit e08f5ef550
17 changed files with 418 additions and 522 deletions
+10 -5
View File
@@ -12,7 +12,6 @@ import type {
NpcId,
NpcRelationId,
NpcGroupId,
NpcBinding,
NpcsOverlayEvent,
NpcsOverlayState,
Project,
@@ -369,7 +368,6 @@ export type IpcInvokeMap = {
description?: string;
filePath?: string;
groupId?: NpcGroupId | null;
binding?: NpcBinding;
};
res: { project: Project };
};
@@ -379,7 +377,6 @@ export type IpcInvokeMap = {
name?: string;
description?: string;
groupId?: NpcGroupId | null;
binding?: NpcBinding;
};
res: { project: Project };
};
@@ -493,7 +490,10 @@ export type IpcInvokeMap = {
};
[ipcChannels.project.getProjectStorylines]: {
req: { projectId: ProjectId; labels: StorylineLabels };
res: { storylines: StorylineListItem[] };
res: {
storylines: StorylineListItem[];
npcs: { id: string; name: string }[];
};
};
[ipcChannels.project.peekImportZip]: {
req: { labels: StorylineLabels; targetHasMainStart: boolean };
@@ -560,7 +560,12 @@ export type IpcInvokeMap = {
res: { project: Project };
};
[ipcChannels.project.exportZip]: {
req: { projectId: ProjectId; storylineSelections: StorylineSelection[]; labels: StorylineLabels };
req: {
projectId: ProjectId;
storylineSelections: StorylineSelection[];
npcIds: string[];
labels: StorylineLabels;
};
res: { canceled: true } | { canceled: false };
};
[ipcChannels.project.deleteProject]: {