forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
e284f4fc76
commit
15a5254380
52 files changed
+637
-80
No files matched your search
@@ -12,6 +12,7 @@ import { dungeonBossCards } from "../game/dungeonBossCards";
|
||||
import { requireDungeonDefinition } from "../game/dungeonRegistry";
|
||||
import { DungeonBossCards } from "./DungeonBossCards";
|
||||
import { useDungeonRaceStore } from "../app/dungeonRaceStore";
|
||||
import { dungeonRaceAffix } from "../game/dungeonRaceAffixes";
|
||||
|
||||
function PauseDialog() {
|
||||
const closeOverlay = useGameStore((state) => state.closeOverlay);
|
||||
@@ -19,6 +20,8 @@ function PauseDialog() {
|
||||
const reset = useGameStore((state) => state.resetAtEntrance);
|
||||
const gameMode = useGameStore((state) => state.gameMode);
|
||||
const activeDungeonId = useGameStore((state) => state.activeDungeonId);
|
||||
const raceAffixIds = useDungeonRaceStore((state) =>
|
||||
state.inGame && state.dungeonId === activeDungeonId ? state.affixIds : null);
|
||||
const activeDifficultyId = useGameStore((state) => state.activeDifficultyId);
|
||||
const sessionRevision = useGameStore((state) => state.sessionRevision);
|
||||
const bossTest = useGameStore((state) => state.bossTest);
|
||||
@@ -57,6 +60,7 @@ function PauseDialog() {
|
||||
const dungeonCards = useMemo(() => gameMode === "dungeon"
|
||||
? dungeonBossCards(requireDungeonDefinition(activeDungeonId), activeDifficultyId, bossCards)
|
||||
: [], [activeDungeonId, activeDifficultyId, bossCards, gameMode, sessionRevision]);
|
||||
const raceAffixes = raceAffixIds?.map((id) => dungeonRaceAffix(id)).filter((affix) => affix !== undefined) ?? [];
|
||||
|
||||
const actions = useMemo<MenuAction[]>(() => [
|
||||
{ id: "pause-resume", run: resume, neighbors: { down: "pause-party", right: "pause-party", up: "pause-main-menu", left: "pause-main-menu" } },
|
||||
@@ -111,6 +115,14 @@ function PauseDialog() {
|
||||
</div>
|
||||
{bossTest && <p className="pause-menu__context">Boss Testing · {bossTest.name}</p>}
|
||||
</header>
|
||||
{raceAffixes.length > 0 && <section className="pause-menu__affixes" aria-label="Active race affixes">
|
||||
<strong className="pause-menu__affixes-heading">Race affixes</strong>
|
||||
<div className="pause-menu__affixes-list">
|
||||
{raceAffixes.map((affix) => <p key={affix.id}>
|
||||
<strong>{affix.name}</strong><span>{affix.description}</span>
|
||||
</p>)}
|
||||
</div>
|
||||
</section>}
|
||||
{gameMode === "dungeon" && <section className="pause-menu__bosses" aria-label="Boss cards in this dungeon">
|
||||
<div className="pause-menu__bosses-heading"><strong>Boss cards in this dungeon</strong>
|
||||
<span>{dungeonCards.filter((card) => card.copies > 0).length} / {dungeonCards.length} collected</span></div>
|
||||
|
||||
@@ -46,7 +46,7 @@ describe("gameplay panel loading integration", () => {
|
||||
});
|
||||
|
||||
it("warms the shared runtime and first-open panels before gameplay mounts", () => {
|
||||
expect(appSource).toContain("preloadSharedGameplayResources(originalMediaEnabled)");
|
||||
expect(appSource).toContain('preloadSharedGameplayResources(originalMediaEnabled, character?.classId === "priest")');
|
||||
expect(appSource).toContain("getLoadedGameRuntime()");
|
||||
expect(gameplayResourcesSource).toContain('import("../GameRuntime")');
|
||||
expect(gameplayResourcesSource).toContain('import("./PartyManagementPanel")');
|
||||
|
||||
@@ -62,7 +62,10 @@ export function getLoadedBossGuidePanel() {
|
||||
return loadedBossGuidePanel;
|
||||
}
|
||||
|
||||
export async function preloadSharedGameplayResources(originalMediaEnabled: boolean): Promise<void> {
|
||||
export async function preloadSharedGameplayResources(
|
||||
originalMediaEnabled: boolean,
|
||||
priestCharacter: boolean,
|
||||
): Promise<void> {
|
||||
await Promise.all([
|
||||
loadGameRuntime(),
|
||||
loadPartyManagementPanel(),
|
||||
@@ -73,4 +76,10 @@ export async function preloadSharedGameplayResources(originalMediaEnabled: boole
|
||||
if (!await ensureCombatMediaPack()) return;
|
||||
const { preloadCombatEffectManifest } = await import("../game/combatPresentation");
|
||||
await preloadCombatEffectManifest();
|
||||
if (priestCharacter) {
|
||||
const { preloadShadowfiendMedia } = await import("../scene/shadowfiendMedia");
|
||||
await preloadShadowfiendMedia().catch((error: unknown) => {
|
||||
console.warn("Shadowfiend model could not be prepared before entering the expedition.", error);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user