diff --git a/public/res/tour/riddle_9/voiceovers/Ende 1 Die schwere Krone.mp3 b/public/res/outro/voiceovers/Station 9 Ende 1. Die schwere Krone.mp3 similarity index 100% rename from public/res/tour/riddle_9/voiceovers/Ende 1 Die schwere Krone.mp3 rename to public/res/outro/voiceovers/Station 9 Ende 1. Die schwere Krone.mp3 diff --git a/public/res/tour/riddle_9/voiceovers/Ende 2 Der geachtete König.mp3 b/public/res/outro/voiceovers/Station 9 Ende 2. Der geachtete König.mp3 similarity index 100% rename from public/res/tour/riddle_9/voiceovers/Ende 2 Der geachtete König.mp3 rename to public/res/outro/voiceovers/Station 9 Ende 2. Der geachtete König.mp3 diff --git a/public/res/tour/riddle_9/voiceovers/Ende 2 Der würdige König.mp3 b/public/res/outro/voiceovers/Station 9 Ende 3. Der würdige König.mp3 similarity index 100% rename from public/res/tour/riddle_9/voiceovers/Ende 2 Der würdige König.mp3 rename to public/res/outro/voiceovers/Station 9 Ende 3. Der würdige König.mp3 diff --git a/public/res/tour/riddle_4/voiceovers/Hinweis 1.mp3 b/public/res/tour/riddle_4/voiceovers/Hinweis 1.mp3 index bd7767e..2e7d11f 100644 Binary files a/public/res/tour/riddle_4/voiceovers/Hinweis 1.mp3 and b/public/res/tour/riddle_4/voiceovers/Hinweis 1.mp3 differ diff --git a/public/res/tour/riddle_4/voiceovers/Hinweis 2.mp3 b/public/res/tour/riddle_4/voiceovers/Hinweis 2.mp3 index 7ee21c3..075414a 100644 Binary files a/public/res/tour/riddle_4/voiceovers/Hinweis 2.mp3 and b/public/res/tour/riddle_4/voiceovers/Hinweis 2.mp3 differ diff --git a/public/res/tour/riddle_5/voiceovers/Hinweis 1.mp3 b/public/res/tour/riddle_5/voiceovers/Hinweis 1.mp3 new file mode 100644 index 0000000..6c853a2 Binary files /dev/null and b/public/res/tour/riddle_5/voiceovers/Hinweis 1.mp3 differ diff --git a/public/res/tour/riddle_5/voiceovers/Hinweis.mp3 b/public/res/tour/riddle_5/voiceovers/Hinweis.mp3 deleted file mode 100644 index e752e8a..0000000 Binary files a/public/res/tour/riddle_5/voiceovers/Hinweis.mp3 and /dev/null differ diff --git a/public/res/tour/riddle_7/voiceovers/Hinweis 1.mp3 b/public/res/tour/riddle_7/voiceovers/Hinweis 1.mp3 new file mode 100644 index 0000000..efea9a9 Binary files /dev/null and b/public/res/tour/riddle_7/voiceovers/Hinweis 1.mp3 differ diff --git a/public/res/tour/riddle_7/voiceovers/Hinweis 2.mp3 b/public/res/tour/riddle_7/voiceovers/Hinweis 2.mp3 new file mode 100644 index 0000000..bda438c Binary files /dev/null and b/public/res/tour/riddle_7/voiceovers/Hinweis 2.mp3 differ diff --git a/public/res/tour/riddle_7/voiceovers/Hinweis_1.mp3 b/public/res/tour/riddle_7/voiceovers/Hinweis_1.mp3 deleted file mode 100644 index d5e6616..0000000 Binary files a/public/res/tour/riddle_7/voiceovers/Hinweis_1.mp3 and /dev/null differ diff --git a/public/res/tour/riddle_7/voiceovers/Hinweis_2.mp3 b/public/res/tour/riddle_7/voiceovers/Hinweis_2.mp3 deleted file mode 100644 index 3d81e4f..0000000 Binary files a/public/res/tour/riddle_7/voiceovers/Hinweis_2.mp3 and /dev/null differ diff --git a/public/res/tour/riddle_8/voiceovers/Hinweis 1.mp3 b/public/res/tour/riddle_8/voiceovers/Hinweis 1.mp3 new file mode 100644 index 0000000..f24598c Binary files /dev/null and b/public/res/tour/riddle_8/voiceovers/Hinweis 1.mp3 differ diff --git a/public/res/tour/riddle_8/voiceovers/Hinweis.mp3 b/public/res/tour/riddle_8/voiceovers/Hinweis.mp3 deleted file mode 100644 index dc15023..0000000 Binary files a/public/res/tour/riddle_8/voiceovers/Hinweis.mp3 and /dev/null differ diff --git a/src/components/RiddleHintPage.tsx b/src/components/RiddleHintPage.tsx index 235eede..d3ba901 100644 --- a/src/components/RiddleHintPage.tsx +++ b/src/components/RiddleHintPage.tsx @@ -10,22 +10,27 @@ import OldButton from "./OldButton"; import { addBoughtHint, getBoughtHints } from "@/utils/boughtHints"; import OldPopUp from "./OldPopUp"; import { getPoints, takePoints } from "@/utils/points"; +import VoiceOver from "./VoiceOver"; +import { VoiceOverMode } from "@/types/voiceOverMode"; interface RiddleHintProps { riddle: Riddle; onSkip?: (() => void) | null; dismissHintPage: () => void; + voiceOverMode: VoiceOverMode; }; export default function RiddleHintPage({ riddle, onSkip, - dismissHintPage + dismissHintPage, + voiceOverMode }: RiddleHintProps) { //const [ pointsStr, ] = useLocalStorage(PREF.points, ""); const [ boughtHintsStr, ] = useLocalStorage(PREF.boughtHints, ""); const [ showBuyHint, setShowBuyHint ] = useState(false); const [ showSkipRiddle, setShowSkipRiddle ] = useState(false); + const [ currentVoiceOver, setCurrentVoiceOver ] = useState(-1); const boughtHints = useMemo(() => { return getBoughtHints(); @@ -47,10 +52,20 @@ export default function RiddleHintPage({ return sortedHints.find(h => !boughtHints.includes(h.id)); }, [sortedHints, boughtHints]); - console.log(boughtHints); + console.log(sortedHints, nextHintToBuy); return (
+ { currentVoiceOver > -1 ? + + : null}

Hinweise

@@ -79,6 +94,7 @@ export default function RiddleHintPage({

Möchtet ihr diesen Hinweis für {nextHintToBuy.penaltyPoints} Rufpunkte kaufen?

= nextHintToBuy.penaltyPoints}*/ onAction={() => { addBoughtHint(nextHintToBuy.id); + setCurrentVoiceOver(nextHintToBuy.hintOrder + 1) takePoints(nextHintToBuy.penaltyPoints); setShowBuyHint(false); }}>JA, KAUFEN! diff --git a/src/components/riddles/Riddle_1.tsx b/src/components/riddles/Riddle_1.tsx index fcd1ab1..f21e2c4 100644 --- a/src/components/riddles/Riddle_1.tsx +++ b/src/components/riddles/Riddle_1.tsx @@ -252,5 +252,5 @@ export default function Riddle_1({ ) ]; - return requestingHint ? : pages[page]; + return requestingHint ? : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_2.tsx b/src/components/riddles/Riddle_2.tsx index 5b5a8d6..eecb224 100644 --- a/src/components/riddles/Riddle_2.tsx +++ b/src/components/riddles/Riddle_2.tsx @@ -105,5 +105,5 @@ export default function Riddle_2({ ) ]; - return requestingHint ? setPage(2)}/> : pages[page]; + return requestingHint ? setPage(2)}/> : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_3.tsx b/src/components/riddles/Riddle_3.tsx index 6d811b0..a3662ad 100644 --- a/src/components/riddles/Riddle_3.tsx +++ b/src/components/riddles/Riddle_3.tsx @@ -160,7 +160,7 @@ export default function Riddle_3({ ) ]; - return requestingHint ? { + return requestingHint ? { setScaleValue(1); setPage(2); }}/> : pages[page]; diff --git a/src/components/riddles/Riddle_4.tsx b/src/components/riddles/Riddle_4.tsx index 3d86458..d6e269c 100644 --- a/src/components/riddles/Riddle_4.tsx +++ b/src/components/riddles/Riddle_4.tsx @@ -124,7 +124,7 @@ export default function Riddle_4({ ) ]; - return requestingHint ? { + return requestingHint ? { setSelection(-1); setPage(2); }}/> : pages[page]; diff --git a/src/components/riddles/Riddle_5.tsx b/src/components/riddles/Riddle_5.tsx index 0589527..3ea98c4 100644 --- a/src/components/riddles/Riddle_5.tsx +++ b/src/components/riddles/Riddle_5.tsx @@ -124,5 +124,5 @@ export default function Riddle_5({ ) ]; - return requestingHint ? setPage(2)}/> : pages[page]; + return requestingHint ? setPage(2)}/> : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_6.tsx b/src/components/riddles/Riddle_6.tsx index 56d3339..7be96ec 100644 --- a/src/components/riddles/Riddle_6.tsx +++ b/src/components/riddles/Riddle_6.tsx @@ -313,5 +313,5 @@ export default function Riddle_6({ ) ]; - return requestingHint ? setPage(4)}/> : pages[page]; + return requestingHint ? setPage(4)}/> : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_7.tsx b/src/components/riddles/Riddle_7.tsx index d9da789..1a759f7 100644 --- a/src/components/riddles/Riddle_7.tsx +++ b/src/components/riddles/Riddle_7.tsx @@ -166,5 +166,5 @@ export default function Riddle_7({ ) ]; - return requestingHint ? setPage(5)}/> : pages[page]; + return requestingHint ? setPage(5)}/> : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_8.tsx b/src/components/riddles/Riddle_8.tsx index aa25479..e026e6c 100644 --- a/src/components/riddles/Riddle_8.tsx +++ b/src/components/riddles/Riddle_8.tsx @@ -166,5 +166,5 @@ export default function Riddle_8({ ) ]; - return requestingHint ? setPage(3)}/> : pages[page]; + return requestingHint ? setPage(3)}/> : pages[page]; } \ No newline at end of file diff --git a/src/components/riddles/Riddle_9.tsx b/src/components/riddles/Riddle_9.tsx index e6613d7..ded959b 100644 --- a/src/components/riddles/Riddle_9.tsx +++ b/src/components/riddles/Riddle_9.tsx @@ -126,5 +126,5 @@ export default function Riddle_9({ ) ]; - return requestingHint ? setPage(3))}/> : pages[page]; + return requestingHint ? setPage(3))}/> : pages[page]; } \ No newline at end of file