feat: add puzzle residence configuration and reflection progress logic

- Introduced `puzzleResidences.ts` to define puzzle residence configurations including properties like display name, position, and puzzle availability.
- Added `reflectionProgress.ts` to manage badge unlocking logic based on place completion, including functions to determine unlocked badges and video sources for scenes.
This commit is contained in:
zhongyidian committed 2026-04-27 11:49:30 +08:00
1 parent e0fa47d21a
commit f5f36f75b5
153 files changed
+3846 -2352

No files matched your search

+10 -7
View File
@@ -9,6 +9,7 @@ export interface LetterToLuxunProps {
showVideo?: boolean
videoSrc?: string
replyImageSrc?: string
replyVideoSrc?: string
}
const commonSelectField: LetterFieldConfig = {
@@ -17,7 +18,7 @@ const commonSelectField: LetterFieldConfig = {
fitContent: false,
className: '!w-[120px] !min-w-[120px] shrink-0 px-0',
options: [
{ value: '旨在立人', label: '旨在立人' },
{ value: '首在立人', label: '首在立人' },
{ value: '批判求真', label: '批判求真' },
],
}
@@ -28,18 +29,18 @@ const letterContent = `敬爱的鲁迅先生:
今天,我怀着崇敬的心情走进大陆新村 9 号,看着您亲手撰写的《呐喊》《且介亭杂文》《故事新编》等作品,您编辑的《萌芽》《前哨》等杂志,您翻译的《艺术论》《死魂灵》等译文,仿佛能看到您“吾将上下而求索”的身影。在这场跨越时空的对话中,我终于明白您坚守的“____”,不是抽象的理念,而是我们安身立命的根本;您秉持的“____”,不是无谓的锋芒,而是我们直面现实的勇气。
我是____专业的学生,今后,我会以您“____于夫指”的骨气,在是非面前坚守立场,不随波逐流;我会以您“俯首甘为____”的热忱,参与____活动,用微光温暖他人;我更会记住您“____,走的人多了,也便成了路”的箴言,在专业领域勇于探索,努力用____为民族复兴、文化繁荣添砖加瓦。
我是____专业的学生,今后,我会以您“____千夫指”的骨气,在是非面前坚守立场,不随波逐流;我会以您“俯首甘为____”的热忱,参与____活动,用微光温暖他人;我更会记住您“____,走的人多了,也便成了路”的箴言,在专业领域勇于探索,努力用____为民族复兴、文化繁荣添砖加瓦。
请您放心,您播下的“立人”火种,我们会让它在新时代燎原;您毕生追求的“人国”愿景,我们会用青春和奋斗去守护!`
const fields: Record<number, LetterFieldConfig> = {
0: {
...commonSelectField,
correctValue: '旨在立人',
correctValue: '首在立人',
hints: {
error: '请你结合上下文和所学在想想吧!',
},
readOnlyFallback: '旨在立人',
readOnlyFallback: '首在立人',
},
1: {
...commonSelectField,
@@ -85,8 +86,8 @@ const fields: Record<number, LetterFieldConfig> = {
type: 'input',
maxLength: 16,
widthClassName: 'w-[120px]',
correctValue: '世上本没有路',
readOnlyFallback: '世上本没有路',
correctValue: '地上本没有路',
readOnlyFallback: '地上本没有路',
hints: {
error: '鲁迅在小说《故乡》中写道:“地上本没有路,走的人多了,也便成了路。”',
},
@@ -108,6 +109,7 @@ const LetterToLuxun = ({
showVideo = true,
videoSrc = 'video/letter/neihua_jixin.mp4',
replyImageSrc = 'components/letter/点击信详情-鲁迅',
replyVideoSrc = 'video/letter/luxun_gaizhang.mp4',
}: LetterToLuxunProps) => {
return (
<LetterTemplate
@@ -115,12 +117,13 @@ const LetterToLuxun = ({
onClose={onClose}
onSubmit={onSubmit}
onAnimationEnd={onAnimationEnd}
title="寄给鲁迅的信"
title="写给鲁迅先生的信"
letterContent={letterContent}
fields={fields}
audioSrc={audioSrc}
showVideo={showVideo}
videoSrc={videoSrc}
replyVideoSrc={replyVideoSrc}
replyImageSrc={replyImageSrc}
/>
)