Update Healer Man server
This commit is contained in:
1 parent
f90ba7d989
commit
189b94d6b7
51 files changed
+3448
-154
No files matched your search
+43
-16
@@ -1,4 +1,4 @@
|
||||
import { lazy, Suspense, useMemo, useState } from "react";
|
||||
import { lazy, Suspense, useCallback, useMemo, useState } from "react";
|
||||
import { classById } from "../app/characterCatalog";
|
||||
import { selectedCharacter, useShellStore } from "../app/shellStore";
|
||||
import { DualDisplayFrame } from "../components/DualDisplayFrame";
|
||||
@@ -28,8 +28,22 @@ const GAME_MODES = [
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "randomized-bite-sized",
|
||||
id: "random-dungeon",
|
||||
number: "02",
|
||||
name: "Random Dungeon",
|
||||
description: "Let fate choose an available full dungeon from WoW or RoM.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "random-bite-sized",
|
||||
number: "03",
|
||||
name: "Random Regular Bite-Sized Dungeon",
|
||||
description: "Choose a short authored dungeon with its regular enemies and boss rules.",
|
||||
available: true,
|
||||
},
|
||||
{
|
||||
id: "randomized-bite-sized",
|
||||
number: "04",
|
||||
name: "Randomized Bite-Sized",
|
||||
description: "Run a short dungeon with every mob and the final boss rerolled.",
|
||||
available: true,
|
||||
@@ -114,6 +128,8 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
const activeCharacter = useShellStore((state) => state.activeCharacter);
|
||||
const rosterCharacter = useShellStore(selectedCharacter);
|
||||
const openDungeons = useShellStore((state) => state.openDungeons);
|
||||
const openRandomDungeon = useCallback(() => openDungeons("random"), [openDungeons]);
|
||||
const openRandomBiteSizedDungeon = useCallback(() => openDungeons("random-bite-sized"), [openDungeons]);
|
||||
const openManastorms = useShellStore((state) => state.openManastorms);
|
||||
const openArenas = useShellStore((state) => state.openArenas);
|
||||
const openClassHall = useShellStore((state) => state.openClassHall);
|
||||
@@ -137,12 +153,22 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
{
|
||||
id: "mode-dungeons",
|
||||
run: openDungeons,
|
||||
neighbors: { up: "back-to-roster", right: "mode-randomized-bite-sized" },
|
||||
neighbors: { up: "back-to-roster", right: "mode-random-dungeon", down: "mode-random-bite-sized" },
|
||||
},
|
||||
{
|
||||
id: "mode-random-dungeon",
|
||||
run: openRandomDungeon,
|
||||
neighbors: { up: "back-to-roster", left: "mode-dungeons", down: "mode-randomized-bite-sized" },
|
||||
},
|
||||
{
|
||||
id: "mode-random-bite-sized",
|
||||
run: openRandomBiteSizedDungeon,
|
||||
neighbors: { up: "mode-dungeons", right: "mode-randomized-bite-sized" },
|
||||
},
|
||||
{
|
||||
id: "mode-randomized-bite-sized",
|
||||
run: onOpenRandomizedBiteSized,
|
||||
neighbors: { up: "back-to-roster", left: "mode-dungeons" },
|
||||
neighbors: { up: "mode-random-dungeon", left: "mode-random-bite-sized" },
|
||||
},
|
||||
...(character ? [
|
||||
{ id: "mode-class-hall", run: openClassHall },
|
||||
@@ -158,7 +184,7 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
] : []),
|
||||
{ id: "mode-downloads", run: onOpenDownloads },
|
||||
{ id: "back-to-roster", run: returnToCharacters, neighbors: { down: "mode-dungeons" } },
|
||||
], [character, gmMenuOpen, isGm, onOpenBalanceLab, onOpenBalanceTuning, onOpenBossTesting, onOpenCards, onOpenDownloads, onOpenEditor, onOpenRandomizedBiteSized, onOpenReadiness, onOpenReports, openArenas, openClassHall, openDungeons, openGmAdmin, openManastorms, returnToCharacters]);
|
||||
], [character, gmMenuOpen, isGm, onOpenBalanceLab, onOpenBalanceTuning, onOpenBossTesting, onOpenCards, onOpenDownloads, onOpenEditor, onOpenRandomizedBiteSized, onOpenReadiness, onOpenReports, openArenas, openClassHall, openDungeons, openGmAdmin, openManastorms, openRandomBiteSizedDungeon, openRandomDungeon, returnToCharacters]);
|
||||
const controller = useMenuController(actions, {
|
||||
columns: 2,
|
||||
initialId: gmMenuOpen ? (isGm ? "gm-menu-gm-tools" : "gm-menu-boss-testing") : "mode-dungeons",
|
||||
@@ -168,6 +194,15 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
const characterClass = character ? classById(character.classId) : null;
|
||||
const specialization = specializationById(character?.specializationId);
|
||||
const secondaryClass = character?.secondaryClassId ? classById(character.secondaryClassId) : null;
|
||||
const gameModeAction = (id: string) => {
|
||||
if (id === "manastorms") return openManastorms;
|
||||
if (id === "arenas") return openArenas;
|
||||
if (id === "downloads") return onOpenDownloads;
|
||||
if (id === "random-dungeon") return openRandomDungeon;
|
||||
if (id === "random-bite-sized") return openRandomBiteSizedDungeon;
|
||||
if (id === "randomized-bite-sized") return onOpenRandomizedBiteSized;
|
||||
return () => openDungeons();
|
||||
};
|
||||
const renderGameMode = (mode: (typeof GAME_MODES)[number]) => mode.available ? (
|
||||
<ControllerButton
|
||||
key={mode.id}
|
||||
@@ -176,15 +211,7 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
select={controller.select}
|
||||
className="front-button main-menu-mode main-menu-mode--available"
|
||||
type="button"
|
||||
onClick={mode.id === "manastorms"
|
||||
? openManastorms
|
||||
: mode.id === "arenas"
|
||||
? openArenas
|
||||
: mode.id === "downloads"
|
||||
? onOpenDownloads
|
||||
: mode.id === "randomized-bite-sized"
|
||||
? onOpenRandomizedBiteSized
|
||||
: openDungeons}
|
||||
onClick={gameModeAction(mode.id)}
|
||||
>
|
||||
<b aria-hidden="true">{mode.number}</b>
|
||||
<span><strong>{mode.name}</strong><small>{mode.description}</small></span>
|
||||
@@ -247,7 +274,7 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
<section className="main-menu-card main-menu-card--adventures" aria-labelledby="main-menu-adventures-title">
|
||||
<header><span>01</span><strong id="main-menu-adventures-title">Adventures</strong></header>
|
||||
<div className="main-menu-card__grid">
|
||||
{GAME_MODES.filter((mode) => mode.id === "dungeons" || mode.id === "randomized-bite-sized").map(renderGameMode)}
|
||||
{GAME_MODES.filter((mode) => ["dungeons", "random-dungeon", "random-bite-sized", "randomized-bite-sized"].includes(mode.id)).map(renderGameMode)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -280,7 +307,7 @@ function MainMenuDestinations({ onOpenDownloads, onOpenReports, onOpenCards, onO
|
||||
className="front-button main-menu-mode main-menu-mode--available main-menu-mode--gm-menu" type="button" onClick={() => setGmMenuOpen(true)}>
|
||||
<b aria-hidden="true">GM</b><span><strong>GM Menu</strong><small>Testing, readiness, reports, and balance tools.</small></span><em>Open</em>
|
||||
</ControllerButton>
|
||||
{GAME_MODES.filter((mode) => mode.id !== "dungeons" && mode.id !== "randomized-bite-sized").map(renderGameMode)}
|
||||
{GAME_MODES.filter((mode) => !["dungeons", "random-dungeon", "random-bite-sized", "randomized-bite-sized"].includes(mode.id)).map(renderGameMode)}
|
||||
</div>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user