refactor: 收口 Bark Battle 草稿恢复映射

This commit is contained in:
2026-06-04 05:14:23 +08:00
parent 20a21ee78b
commit 9c96535073
6 changed files with 64 additions and 24 deletions

View File

@@ -380,6 +380,7 @@ import {
} from '../visual-novel-creation/visualNovelEntryGeneration';
import { createMockVisualNovelRunFromDraft } from '../visual-novel-runtime/visualNovelMockData';
import {
buildBarkBattleDraftConfigFromWorkSummary,
buildBarkBattlePublishedConfigFromDraft,
buildBarkBattlePublishedConfigFromWork,
buildBarkBattlePublishSnapshot,
@@ -11006,23 +11007,7 @@ export function PlatformEntryFlowShellImpl({
return;
}
const nextDraft: BarkBattleDraftConfig = {
draftId: item.draftId ?? item.workId,
workId: item.workId,
title: item.title,
description: item.summary,
themeDescription: item.themeDescription,
playerImageDescription: item.playerImageDescription,
opponentImageDescription: item.opponentImageDescription,
onomatopoeia: item.onomatopoeia,
playerCharacterImageSrc: item.playerCharacterImageSrc ?? undefined,
opponentCharacterImageSrc: item.opponentCharacterImageSrc ?? undefined,
uiBackgroundImageSrc: item.uiBackgroundImageSrc ?? undefined,
difficultyPreset: item.difficultyPreset,
configVersion: 1,
rulesetVersion: 'bark-battle-ruleset-v1',
updatedAt: item.updatedAt,
};
const nextDraft = buildBarkBattleDraftConfigFromWorkSummary(item);
setBarkBattleDraftConfig(nextDraft);
enterCreateTab();
selectionStageRef.current = isPersistedBarkBattleDraftGenerating(item)