Release Healer Man 0.1.5
This commit is contained in:
1 parent
f4c9cf356c
commit
55cfd43d66
62 files changed
+3030
-153
No files matched your search
@@ -3,6 +3,7 @@ import { useShellStore } from "../app/shellStore";
|
||||
import { useGameStore } from "../game/store";
|
||||
import { useMenuController, type MenuAction } from "../input/useMenuController";
|
||||
import { ControllerButton } from "./ControllerButton";
|
||||
import { isGameMasterSession } from "../game/manastormAdminConfig";
|
||||
|
||||
function PauseDialog() {
|
||||
const closeOverlay = useGameStore((state) => state.closeOverlay);
|
||||
@@ -10,6 +11,7 @@ function PauseDialog() {
|
||||
const reset = useGameStore((state) => state.resetAtEntrance);
|
||||
const gameMode = useGameStore((state) => state.gameMode);
|
||||
const activeCharacter = useShellStore((state) => state.activeCharacter);
|
||||
const session = useShellStore((state) => state.session);
|
||||
const returnToMainMenu = useShellStore((state) => state.returnToMainMenu);
|
||||
const abandonManastormRun = useShellStore((state) => state.abandonManastormRun);
|
||||
|
||||
@@ -28,6 +30,7 @@ function PauseDialog() {
|
||||
abandonManastormRun();
|
||||
};
|
||||
const skillMenuLabel = activeCharacter?.categoryId === "rom" ? "Skills" : "Talents";
|
||||
const isGm = isGameMasterSession(session);
|
||||
|
||||
const actions = useMemo<MenuAction[]>(() => [
|
||||
{ id: "pause-resume", run: resume },
|
||||
@@ -38,11 +41,12 @@ function PauseDialog() {
|
||||
{ id: "pause-bindings", run: () => openOverlay("bindings") },
|
||||
{ id: "pause-talents", run: () => openOverlay("talents") },
|
||||
{ id: "pause-options", run: () => openOverlay("options") },
|
||||
...(isGm ? [{ id: "pause-gm", run: () => openOverlay("gm") }] : []),
|
||||
...(gameMode === "manastorm"
|
||||
? [{ id: "pause-abandon-manastorm", run: abandonManastorm }]
|
||||
: [{ id: "pause-entrance", run: returnToEntrance }]),
|
||||
{ id: "pause-main-menu", run: leaveDungeon },
|
||||
], [abandonManastormRun, closeOverlay, gameMode, openOverlay, reset, returnToMainMenu]);
|
||||
], [abandonManastormRun, closeOverlay, gameMode, isGm, openOverlay, reset, returnToMainMenu]);
|
||||
const controller = useMenuController(actions, { initialId: "pause-resume", onBack: resume });
|
||||
|
||||
const menuButton = (id: string, label: string, run: () => void, primary = false) => (
|
||||
@@ -71,6 +75,7 @@ function PauseDialog() {
|
||||
{menuButton("pause-bindings", "Ability controls", () => openOverlay("bindings"))}
|
||||
{menuButton("pause-talents", skillMenuLabel, () => openOverlay("talents"))}
|
||||
{menuButton("pause-options", "Options", () => openOverlay("options"))}
|
||||
{isGm ? menuButton("pause-gm", "GM placement editor", () => openOverlay("gm")) : null}
|
||||
{gameMode === "manastorm"
|
||||
? menuButton("pause-abandon-manastorm", "Abandon Manastorm run", abandonManastorm)
|
||||
: menuButton("pause-entrance", "Return to entrance", returnToEntrance)}
|
||||
|
||||
Reference in new issue
Block a user