Release v0.1.7 2026-07-12

This commit is contained in:
Warren H
2026-07-12 23:39:57 -04:00
parent 122f159b94
commit 77fd434226
31 changed files with 545 additions and 113 deletions
+17 -2
View File
@@ -23,7 +23,9 @@ export type GameCommand =
| { name: "setPauseSelection"; selection: "resume" | "exit" }
| { name: "setSelectedRunBuff"; buffId: RunBuffId }
| { name: "chooseRunBuff"; buffId: RunBuffId }
| { name: "continueRoguelikeRound" };
| { name: "continueRoguelikeRound" }
| { name: "startRogueTrialsEndless" }
| { name: "setEndlessChoiceSelection"; selection: "continue" | "quit" };
export type FrontendCommand =
| { name: "signIn"; username: string; password: string }
@@ -52,9 +54,11 @@ export type FrontendCommand =
| { name: "equipPassiveInfusion"; passiveId: RunBuffId }
| { name: "selectHealerClass"; classId: HealerClassId }
| { name: "updateSetting"; key: keyof GameSettings; value: GameSettings[keyof GameSettings] }
| { name: "exitGame" }
| { name: "launchGame"; bossIds: readonly BossId[]; difficultySlug?: DifficultySlug };
export const DUAL_SCREEN_LAUNCH_EVENT = "iwt:dual-screen-launch-game";
export const DUAL_SCREEN_EXIT_EVENT = "iwt:dual-screen-exit-game";
export type DualScreenMessage =
| { type: "app-state"; screen: AppScreen; hunterName: string | null; notice: string; frontend?: FrontendSnapshot; game?: Partial<BottomGameSnapshot> }
@@ -86,6 +90,8 @@ export function executeGameCommand(command: GameCommand) {
case "setSelectedRunBuff": game.setSelectedRunBuff(command.buffId); break;
case "chooseRunBuff": game.chooseRunBuff(command.buffId); break;
case "continueRoguelikeRound": game.continueRoguelikeRound(); break;
case "startRogueTrialsEndless": game.startRogueTrialsEndless(); break;
case "setEndlessChoiceSelection": game.setEndlessChoiceSelection(command.selection); break;
}
}
@@ -118,6 +124,7 @@ export function executeFrontendCommand(command: FrontendCommand) {
case "equipPassiveInfusion": frontend.equipPassiveInfusion(command.passiveId); break;
case "selectHealerClass": frontend.selectHealerClass(command.classId); break;
case "updateSetting": frontend.updateSetting(command.key, command.value); break;
case "exitGame": window.dispatchEvent(new Event(DUAL_SCREEN_EXIT_EVENT)); break;
case "launchGame": window.dispatchEvent(new CustomEvent(DUAL_SCREEN_LAUNCH_EVENT, { detail: { bossIds: command.bossIds, difficultySlug: command.difficultySlug } })); break;
}
}
@@ -132,10 +139,14 @@ export function receiveAuthoritativeMessage(message: DualScreenMessage) {
/** State the lower display actually renders. Renderer-only and progression data stay local to the authoritative screen. */
export type BottomGameSnapshot = Pick<GameState,
| "bossId"
| "bossInstanceId"
| "paused"
| "healerClassId"
| "phase"
| "round"
| "endlessMode"
| "endlessBossKills"
| "endlessChoiceSelection"
| "runModifiers"
| "time"
| "party"
@@ -158,7 +169,7 @@ export type BottomGameSnapshot = Pick<GameState,
>;
const BOTTOM_GAME_SNAPSHOT_KEYS: readonly (keyof BottomGameSnapshot)[] = [
"bossId", "paused", "healerClassId", "phase", "round", "runModifiers", "time", "party", "boss", "additionalBosses",
"bossId", "bossInstanceId", "paused", "healerClassId", "phase", "round", "endlessMode", "endlessBossKills", "endlessChoiceSelection", "runModifiers", "time", "party", "boss", "additionalBosses",
"partyPositions", "bossMotion", "partyCombat", "mana", "maxMana", "selectedMemberId", "cooldowns",
"globalCooldownUntil", "activeTab", "selectedItemId", "inventory", "playerPosition", "activeCast", "barrier",
];
@@ -184,10 +195,14 @@ export function currentBottomGameSnapshot(): BottomGameSnapshot {
const state = useGameStore.getState();
return {
bossId: state.bossId,
bossInstanceId: state.bossInstanceId,
paused: state.paused,
healerClassId: state.healerClassId,
phase: state.phase,
round: state.round,
endlessMode: state.endlessMode,
endlessBossKills: state.endlessBossKills,
endlessChoiceSelection: state.endlessChoiceSelection,
runModifiers: state.runModifiers,
time: state.time,
party: state.party,