Extend square-hole creation flow with visual asset timeout guard

This commit is contained in:
kdletters
2026-05-05 15:27:09 +08:00
parent 2252afb080
commit 60b667a9d1
30 changed files with 2838 additions and 215 deletions

View File

@@ -2,11 +2,15 @@ import type { BigFishWorkSummary } from '../../../packages/shared/src/contracts/
import type { Match3DWorkSummary } from '../../../packages/shared/src/contracts/match3dWorks';
import type { PuzzleDraftLevel } from '../../../packages/shared/src/contracts/puzzleAgentDraft';
import type { PuzzleWorkSummary } from '../../../packages/shared/src/contracts/puzzleWorkSummary';
import type { SquareHoleWorkSummary } from '../../../packages/shared/src/contracts/squareHoleWorks';
import type {
CustomWorldGalleryCard,
CustomWorldLibraryEntry,
} from '../../../packages/shared/src/contracts/runtime';
import type {
SquareHoleHoleOption,
SquareHoleShapeOption,
SquareHoleWorkSummary,
} from '../../../packages/shared/src/contracts/squareHoleWorks';
import { buildCustomWorldPlayableCharacters } from '../../data/characterPresets';
import { resolveCustomWorldCampSceneImage } from '../../data/customWorldVisuals';
import {
@@ -112,6 +116,12 @@ export type PlatformSquareHoleGalleryCard = {
subtitle: string;
summaryText: string;
coverImageSrc: string | null;
backgroundPrompt?: string;
backgroundImageSrc?: string | null;
shapeOptions?: SquareHoleShapeOption[];
holeOptions?: SquareHoleHoleOption[];
shapeCount?: number;
difficulty?: number;
themeTags: string[];
playCount?: number;
remixCount?: number;
@@ -224,9 +234,15 @@ export function mapSquareHoleWorkToPlatformGalleryCard(
ownerUserId: work.ownerUserId,
authorDisplayName: '玩家',
worldName: work.gameName,
subtitle: '反直觉形状分拣',
subtitle: work.twistRule || '反直觉形状分拣',
summaryText: work.summary,
coverImageSrc: work.coverImageSrc ?? null,
backgroundPrompt: work.backgroundPrompt,
backgroundImageSrc: work.backgroundImageSrc ?? null,
shapeOptions: work.shapeOptions,
holeOptions: work.holeOptions,
shapeCount: work.shapeCount,
difficulty: work.difficulty,
themeTags:
work.tags.length > 0 ? work.tags : [work.themeText, '方洞挑战'],
playCount: work.playCount ?? 0,