feat(grid): именованные шаблоны сетки кампании
Несколько шаблонов в проекте с ручным сохранением и применением (включает сетку); без автоподстановки. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1000,6 +1000,26 @@ async function main() {
|
||||
const previewDataUrl = `data:${mime};base64,${buf.toString('base64')}`;
|
||||
return { canceled: false as const, filePath, previewDataUrl };
|
||||
});
|
||||
registerHandler(ipcChannels.project.addGridTemplate, async ({ name, type, sizeN, color }) => {
|
||||
const project = await projectStore.addGridTemplate({ name, type, sizeN, color });
|
||||
emitSessionState();
|
||||
return { project };
|
||||
});
|
||||
registerHandler(ipcChannels.project.renameGridTemplate, async ({ templateId, name }) => {
|
||||
const project = await projectStore.renameGridTemplate(templateId, name);
|
||||
emitSessionState();
|
||||
return { project };
|
||||
});
|
||||
registerHandler(ipcChannels.project.deleteGridTemplate, async ({ templateId }) => {
|
||||
const project = await projectStore.deleteGridTemplate(templateId);
|
||||
emitSessionState();
|
||||
return { project };
|
||||
});
|
||||
registerHandler(ipcChannels.project.applyGridTemplate, async ({ sceneId, templateId }) => {
|
||||
const scene = await projectStore.applyGridTemplate(sceneId, templateId);
|
||||
emitSessionState();
|
||||
return { scene };
|
||||
});
|
||||
registerHandler(
|
||||
ipcChannels.project.upsertNpc,
|
||||
async ({ npcId, name, description, filePath: pathFromDrop, groupId, ringColor, disposition, imageOffset }) => {
|
||||
|
||||
Reference in New Issue
Block a user