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

@@ -146,6 +146,14 @@ const TowelSalesDialog = ({ visible = true, onClose, onComplete }: TowelSalesDia
[value]
)
const getTowelText = useCallback(
(towelId: string) => {
const result = value.find((item) => item.blankId === towelId)
return options.find((option) => option.value === result?.optionValue)?.label
},
[options, value]
)
// 样式
const overlayStyle = useMemo<React.CSSProperties>(
() => ({
@@ -221,6 +229,11 @@ const TowelSalesDialog = ({ visible = true, onClose, onComplete }: TowelSalesDia
alt="毛巾1"
className="w-full h-full object-contain"
/>
{getTowelText('towel1') && (
<div className="absolute inset-0 flex items-center justify-center text-center text-3xl font-bold leading-snug text-[#432800] pointer-events-none">
{getTowelText('towel1')}
</div>
)}
</div>
{/* 毛巾2 */}
@@ -234,6 +247,11 @@ const TowelSalesDialog = ({ visible = true, onClose, onComplete }: TowelSalesDia
alt="毛巾2"
className="w-full h-full object-contain"
/>
{getTowelText('towel2') && (
<div className="absolute inset-0 flex items-center justify-center text-center text-3xl font-bold leading-snug text-[#432800] pointer-events-none">
{getTowelText('towel2')}
</div>
)}
</div>
{/* 毛巾3 */}
@@ -247,6 +265,11 @@ const TowelSalesDialog = ({ visible = true, onClose, onComplete }: TowelSalesDia
alt="毛巾3"
className="w-full h-full object-contain"
/>
{getTowelText('towel3') && (
<div className="absolute inset-0 flex items-center justify-center text-center text-3xl font-bold leading-snug text-[#432800] pointer-events-none">
{getTowelText('towel3')}
</div>
)}
</div>
</div>
</div>