Riddle Hints compat
This commit is contained in:
1 parent
662d8023bb
commit
7ad7c4bd57
10 files changed
+36
-13
No files matched your search
@@ -22,7 +22,7 @@ export default function RiddleHintPage({
|
||||
onSkip,
|
||||
dismissHintPage
|
||||
}: RiddleHintProps) {
|
||||
const [ pointsStr, ] = useLocalStorage(PREF.points, "");
|
||||
//const [ pointsStr, ] = useLocalStorage(PREF.points, "");
|
||||
const [ boughtHintsStr, ] = useLocalStorage(PREF.boughtHints, "");
|
||||
const [ showBuyHint, setShowBuyHint ] = useState(false);
|
||||
const [ showSkipRiddle, setShowSkipRiddle ] = useState(false);
|
||||
@@ -31,9 +31,9 @@ export default function RiddleHintPage({
|
||||
return getBoughtHints();
|
||||
}, [boughtHintsStr]);
|
||||
|
||||
const points = useMemo(() => {
|
||||
/*const points = useMemo(() => {
|
||||
return getPoints();
|
||||
}, [pointsStr]);
|
||||
}, [pointsStr]);*/
|
||||
|
||||
const sortedHints = useMemo(() => {
|
||||
return [...riddle.hints].sort((a, b) => a.hintOrder - b.hintOrder);
|
||||
@@ -77,7 +77,7 @@ export default function RiddleHintPage({
|
||||
<OldPopUp onDismiss={() => setShowBuyHint(false)}>
|
||||
<div className="center-flex">
|
||||
<p>Möchtet ihr diesen Hinweis für {nextHintToBuy.penaltyPoints} Rufpunkte kaufen?</p>
|
||||
<OldButton red={true} disabled={points >= nextHintToBuy.penaltyPoints} onAction={() => {
|
||||
<OldButton red={true} /*disabled={points >= nextHintToBuy.penaltyPoints}*/ onAction={() => {
|
||||
addBoughtHint(nextHintToBuy.id);
|
||||
takePoints(nextHintToBuy.penaltyPoints);
|
||||
setShowBuyHint(false);
|
||||
@@ -90,6 +90,7 @@ export default function RiddleHintPage({
|
||||
<div className="center-flex">
|
||||
<p>Wollt ihr das Rätsel wirklich überspringen?</p>
|
||||
<OldButton red={true} onAction={() => {
|
||||
takePoints(riddle.skipPenaltyPoints);
|
||||
dismissHintPage();
|
||||
if (onSkip) onSkip();
|
||||
//TODO: Add completeRiddle
|
||||
|
||||
Reference in new issue
Block a user