Another pass at basic moments

Adding diary, name of powers, name of moment type, and some supporting
thoughts.

Added a debug menu item to disable or enable the eleven labs speech.
Useful for removing it when debugging
This commit is contained in:
Tyler Marques 2025-05-29 16:20:17 -07:00
parent e1309c4012
commit ecf8e1db06
No known key found for this signature in database
GPG key ID: CB99EDCF41D3016F
7 changed files with 227 additions and 23 deletions

View file

@ -63,19 +63,24 @@ function _setPhase(phaseIndex: number) {
export function nextPhase() {
if (!gameState.isDisplayingMoment && gameState.gameData && gameState.momentsData) {
let moment = gameState.checkPhaseHasMoment(gameState.gameData.phases[gameState.phaseIndex].name)
if (moment !== null && moment.interest_score >= MOMENT_THRESHOLD && moment.hasBeenDisplayed === undefined) {
if (moment !== null && moment.interest_score >= MOMENT_THRESHOLD && moment.powers_involved.length >= 2) {
gameState.isDisplayingMoment = true
moment.hasBeenDisplayed = true
showTwoPowerConversation({ power1: PowerENUM.AUSTRIA, power2: PowerENUM.FRANCE })
const power1 = moment.powers_involved[0];
const power2 = moment.powers_involved[1];
showTwoPowerConversation({
power1: power1,
power2: power2,
moment: moment
})
setTimeout(() => {
closeTwoPowerConversation()
gameState.isDisplayingMoment = false
_setPhase(gameState.phaseIndex + 1)
}, MOMENT_DISPLAY_TIMEOUT_MS)
}
else {
} else {
_setPhase(gameState.phaseIndex + 1)
}
}