feat: add progression logic for puzzle residences

- Implemented functions to manage puzzle progress including checking if residences are started, complete, and unlocked.
- Added utility functions to retrieve piece IDs based on residence and route.
- Introduced a new TypeScript file for progression management.
- Integrated puzzle data configuration and residence data for seamless progression tracking.
This commit is contained in:
zhongyidian committed 2026-05-01 21:19:25 +08:00
1 parent 5a1c3cc368
commit 284302341c
72 files changed
+1104 -517

No files matched your search

+9 -6
View File
@@ -259,7 +259,11 @@ const SunzhongshanReflectionScene1 = () => {
// 获取线索提示图片
const getClueHintImage = (clueId: string): string | null => {
const clueNumber = clueId.split('clue')[1]
return getStaticImage(`${sceneId}/线索${clueNumber}-详情的详情`)
// 场景1中线索1有提示
if (clueNumber && ['1'].includes(clueNumber)) {
return getStaticImage(`${sceneId}/线索${clueNumber}-详情的详情`)
}
return null
}
// 初始化线索(如果还没有)
@@ -442,14 +446,13 @@ const SunzhongshanReflectionScene1 = () => {
<StudyGuideModal
visible={showGuide}
onContinue={handleGuideClose}
firstLineIndent="2em"
zIndex={10000}
audioSrc={getPublicPath('audio/sunzhongshan/mp3_sunzhongshan_48.mp3')}
zIndex={10000}
firstLineIndent="2em"
>
同学你好,欢迎来到二十世纪初的上海。
<br />
同学你好,欢迎来到二十世纪初的上海。{'\n'}
辛亥革命之后,民主共和的观念深入人心。面对中外反动势力,社会各界更广泛地行动起来,以各自的方式争取着民主自由和国家尊严。
<br />
{'\n'}
你需要在本场景中找出4条线索,并正确回答所有问题后,才能拨开时局迷雾,进入下一个场景。
</StudyGuideModal>