rework
This commit is contained in:
1 parent
a683472d62
commit
7179c36173
18 files changed
+1512
-357
No files matched your search
@@ -97,7 +97,6 @@ export default function Riddle_2({
|
||||
//const [throneStatus, setThroneStatus] = useState<string>('N/A');
|
||||
const [ soundInput, setSoundInput ] = useState("Chosen");
|
||||
const wsRef = useRef<WebSocket | null>(null);
|
||||
const [ showControls, setShowControls ] = useState(false);
|
||||
|
||||
const sendCommand = (topic: string, payload: string) => {
|
||||
if (demoMode) return true;
|
||||
@@ -221,57 +220,11 @@ export default function Riddle_2({
|
||||
<p style={{fontWeight: "bold", fontSize: "3rem", marginTop: "2rem", marginBottom: "0"}}>{currentPlayer.name},</p>
|
||||
<p style={{textAlign: "center"}}>zieh nun am Schwert und finde heraus, ob du Excaliburs {currentPlayer.gender === "female" ? "Erbin" : "Erbe"} bist!</p>
|
||||
</div> : null }
|
||||
<div style={{ padding: '20px', fontFamily: 'sans-serif', fontSize: '0.6rem', display: showControls ? "" : "none"}}>
|
||||
<h2 style={{ fontSize: '1rem', marginBottom: '10px' }}>King Arthur - Station Control Dashboard</h2>
|
||||
<p style={{ fontSize: '0.6rem' }}><strong>Connection State:</strong> {status}</p>
|
||||
|
||||
<div style={{ display: 'flex', gap: '20px', marginTop: '20px' }}>
|
||||
<div style={{ border: '1px solid #ccc', padding: '15px', borderRadius: '8px', flex: 1 }}>
|
||||
<h3 style={{ fontSize: '0.8rem', marginTop: 0 }}>Excalibur (Sword)</h3>
|
||||
<p style={{ fontSize: '0.6rem' }}><strong>Stat:<br></br></strong> {swordStatus}</p>
|
||||
<button
|
||||
style={{ fontSize: '0.6rem', padding: '4px 8px' }}
|
||||
onClick={() => sendCommand(`${TOPIC_PREFIX}/set`, 'releaseLock')}
|
||||
>
|
||||
Release Lock
|
||||
</button>
|
||||
<br/><br/>
|
||||
<button
|
||||
style={{ fontSize: '0.6rem', padding: '4px 8px' }}
|
||||
onClick={() => sendCommand(`${TOPIC_PREFIX}/set`, 'stayLocked')}
|
||||
>
|
||||
Stay Locked
|
||||
</button>
|
||||
<br/><br/>
|
||||
<button
|
||||
style={{ fontSize: '0.6rem', padding: '4px 8px' }}
|
||||
onClick={() => sendCommand(`${TOPIC_PREFIX}/set`, 'gameStarted')}
|
||||
>
|
||||
Game Started
|
||||
</button>
|
||||
<br/><br/>
|
||||
<button
|
||||
style={{ fontSize: '0.6rem', padding: '4px 8px' }}
|
||||
onClick={() => sendCommand(`${TOPIC_PREFIX}/set`, 'gameFinished')}
|
||||
>
|
||||
Game Stopped
|
||||
</button>
|
||||
<br/><br/>
|
||||
<input type='text' placeholder='sound' value={soundInput} onChange={(e) => setSoundInput(e.target.value)}/>
|
||||
<br/><br/>
|
||||
<button
|
||||
style={{ fontSize: '0.6rem', padding: '4px 8px' }}
|
||||
onClick={() => sendCommand(`${TOPIC_PREFIX}/cfg`, 'playSound:' + soundInput)}
|
||||
>
|
||||
Play Sound
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles["buttons"]}>
|
||||
<ChargedButton red={false} onAction={() => {
|
||||
if (playerIndex >= players.length-1) {
|
||||
showBanner(false);
|
||||
setPage(2);
|
||||
addPoints(riddle.points);
|
||||
addCompletedRiddle(riddle.step);
|
||||
@@ -313,6 +266,9 @@ export default function Riddle_2({
|
||||
}
|
||||
]}/>
|
||||
<div className={styles["content"]}>
|
||||
<div style={{textAlign: "center", marginBottom: "1rem"}}>
|
||||
<img src={"/res/tour/riddle_" + (riddle.step + 1) + "/result.svg"} width={"50%"}/>
|
||||
</div>
|
||||
<RiddleCompleteBanner points={riddle.points} win={true}></RiddleCompleteBanner>
|
||||
<p>Der Fels gibt nach, und nach all den Jahren liegt Excalibur wieder in der Hand eines Menschen. Die Prophezeiung hat gewählt.</p>
|
||||
<p>Bevor ihr das Schwert zurückgebt, haltet diesen Augenblick fest. Hebt Excalibur, versammelt euch und macht ein Foto, das ebenso gut seinen Platz in den Chroniken von Stettenfels finden könnte. Triumphiert ruhig ein wenig – schließlich zieht man nicht jeden Tag ein legendäres Königsschwert aus einem Felsen.</p>
|
||||
@@ -322,11 +278,32 @@ export default function Riddle_2({
|
||||
<OldButton red={false} disabled={!isSwordBackIn && !demoMode} onAction={() => exitFunction()}>ZURÜCK ZUR KARTE</OldButton>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
(
|
||||
<div key={3}>
|
||||
<VoiceOver voiceOverMode={voiceOverMode} sources={[
|
||||
{
|
||||
"src": "/res/tour/riddle_2/voiceovers/Erfolg.mp3",
|
||||
"type": "audio/mpeg"
|
||||
}
|
||||
]}/>
|
||||
<div className={styles["content"]}>
|
||||
<div style={{textAlign: "center", marginBottom: "1rem"}}>
|
||||
<img src={"/res/tour/riddle_" + (riddle.step + 1) + "/result.svg"} width={"50%"}/>
|
||||
</div>
|
||||
<RiddleCompleteBanner points={0} win={true}></RiddleCompleteBanner>
|
||||
<p><b>{players?.[players?.length - 1]?.name}</b>, du bist <b>{players?.[players?.length - 1]?.gender === "female" ? "die" : "der"} Auserwählte</b> und wärst des Schwertes würdig gewesen. Nun gut, schreitet ohne Schwert und mit nur wenigen Rufpunkten voran.</p>
|
||||
</div>
|
||||
<div className={styles["buttons"]}>
|
||||
<OldButton red={false} disabled={!isSwordBackIn && !demoMode} onAction={() => exitFunction()}>ZURÜCK ZUR KARTE</OldButton>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
];
|
||||
|
||||
return requestingHint ? <RiddleHintPage riddle={riddle} dismissHintPage={dismissHint} voiceOverMode={voiceOverMode} onSkip={() => {
|
||||
addCompletedRiddle(riddle.step);
|
||||
setPage(2);
|
||||
showBanner(false);
|
||||
setPage(3);
|
||||
}}/> : pages[page];
|
||||
}
|
||||
Reference in new issue
Block a user