Release Healer Man 0.1.43
This commit is contained in:
1 parent
c7e8163790
commit
ccc01396cd
86 files changed
+2951
-198
No files matched your search
@@ -32,6 +32,10 @@ import { activeUiLayout, useUiLayoutStore } from "../game/uiLayoutStore";
|
||||
import { normalizeHudPosition } from "../game/hudLayout";
|
||||
import { resolveDpsMeterDisplay, type HudElementLayout } from "../game/uiLayout";
|
||||
import { currentDisplayLayout } from "./displayLayout";
|
||||
import { currentHudSnapshot, type HudSnapshot } from "./hudSnapshot";
|
||||
import { HUD_ELEMENTS, type HudElementId } from "../game/uiLayout";
|
||||
import { interactWithActiveDungeonObject } from "../game/dungeonWorldInteraction";
|
||||
import { resurrectDeadPartyMembers } from "../game/partyResurrection";
|
||||
|
||||
export { createDualScreenChannel } from "./dualScreenChannel";
|
||||
|
||||
@@ -95,6 +99,7 @@ export interface CompanionPartyObjectiveSnapshot {
|
||||
}
|
||||
|
||||
export interface CompanionGameSnapshot {
|
||||
hud: HudSnapshot;
|
||||
dpsMeter: {
|
||||
values: DpsMeterSnapshot;
|
||||
layout: HudElementLayout;
|
||||
@@ -172,7 +177,15 @@ export type CompanionCommand =
|
||||
| { name: "setPartyCommand"; command: PartyCommand }
|
||||
| { name: "recallParty" }
|
||||
| { name: "resetAtEntrance" }
|
||||
| { name: "editDpsMeter"; update: Partial<HudElementLayout> };
|
||||
| { name: "editDpsMeter"; update: Partial<HudElementLayout> }
|
||||
| { name: "editHudElement"; id: HudElementId; update: Partial<HudElementLayout> }
|
||||
| { name: "selectFriendlyActor"; id: string | null }
|
||||
| { name: "selectPlayer" }
|
||||
| { name: "clearPartySelection" }
|
||||
| { name: "resurrectParty"; checkpointId: string }
|
||||
| { name: "interactDungeonObject" }
|
||||
| { name: "finishDungeon" }
|
||||
| { name: "moveThreatMeter"; position: { x: number; y: number } };
|
||||
|
||||
export type DualScreenMessage =
|
||||
| { type: "companion-ready" }
|
||||
@@ -265,6 +278,7 @@ export function currentCompanionSnapshot(): CompanionSnapshot {
|
||||
draft: shell.draft,
|
||||
notice: shell.notice,
|
||||
game: {
|
||||
hud: currentHudSnapshot(),
|
||||
dpsMeter: {
|
||||
values: currentDpsMeterSnapshot(),
|
||||
layout: uiLayout.elements.dps,
|
||||
@@ -342,6 +356,24 @@ export function executeCompanionCommand(command: CompanionCommand): void {
|
||||
const game = useGameStore.getState();
|
||||
const combat = useCombatStore.getState();
|
||||
switch (command.name) {
|
||||
case "editHudElement": {
|
||||
if (game.overlay !== "ui-layout" || !useUiLayoutStore.getState().draft || !(command.id in HUD_ELEMENTS)) break;
|
||||
const update: Partial<HudElementLayout> = {};
|
||||
if (command.update.position) update.position = normalizeHudPosition(command.update.position, { x: .5, y: .5 });
|
||||
if (typeof command.update.width === "number" && Number.isFinite(command.update.width)) update.width = Math.max(20, Math.min(2000, command.update.width));
|
||||
useUiLayoutStore.getState().updateDraft((layout) => ({ ...layout, elements: { ...layout.elements,
|
||||
[command.id]: { ...layout.elements[command.id], ...update },
|
||||
} }));
|
||||
useUiLayoutStore.setState({ selectedElement: command.id });
|
||||
break;
|
||||
}
|
||||
case "selectFriendlyActor": combat.selectFriendlyActor(command.id); break;
|
||||
case "selectPlayer": combat.clearTarget(); usePartyStore.getState().selectSelf(); break;
|
||||
case "clearPartySelection": usePartyStore.getState().clearSelection(); break;
|
||||
case "resurrectParty": resurrectDeadPartyMembers(command.checkpointId); break;
|
||||
case "interactDungeonObject": if (!game.overlay) interactWithActiveDungeonObject(); break;
|
||||
case "finishDungeon": if (currentHudSnapshot().completion) { shell.saveActiveDungeonRunCheckpoint(null); shell.returnToMainMenu(); } break;
|
||||
case "moveThreatMeter": combat.updateSettings({ threatMeterPosition: normalizeHudPosition(command.position, { x: .8, y: .3 }) }); break;
|
||||
case "editDpsMeter": {
|
||||
if (game.overlay !== "ui-layout" || !useUiLayoutStore.getState().draft) break;
|
||||
const update: Partial<HudElementLayout> = {};
|
||||
|
||||
Reference in new issue
Block a user