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
@@ -8,6 +8,7 @@ import { LazyLocalCompanionPanel } from "./LazyLocalCompanionPanel";
|
||||
import { ControllerButton } from "./ControllerButton";
|
||||
import { ContentManagerScreen } from "./ContentManagerScreen";
|
||||
import { BrandMark, ControllerLegend, FrontSurface } from "./FrontSurface";
|
||||
import { isGameMasterSession } from "../game/manastormAdminConfig";
|
||||
|
||||
const GAME_MODES = [
|
||||
{
|
||||
@@ -70,8 +71,11 @@ export function MainMenuScreen() {
|
||||
const openClassHall = useShellStore((state) => state.openClassHall);
|
||||
const returnToCharacters = useShellStore((state) => state.returnToCharacters);
|
||||
const notice = useShellStore((state) => state.notice);
|
||||
const session = useShellStore((state) => state.session);
|
||||
const openGmAdmin = useShellStore((state) => state.openGmAdmin);
|
||||
const character = activeCharacter ?? rosterCharacter;
|
||||
const isRom = character?.categoryId === "rom";
|
||||
const isGm = isGameMasterSession(session);
|
||||
|
||||
const actions = useMemo<MenuAction[]>(() => [
|
||||
{
|
||||
@@ -95,7 +99,8 @@ export function MainMenuScreen() {
|
||||
neighbors: { up: "mode-dungeons", left: "mode-dungeons" },
|
||||
},
|
||||
...(isRom ? [{ id: "mode-class-hall", run: openClassHall }] : []),
|
||||
], [isRom, openClassHall, openDungeons, openManastorms, returnToCharacters]);
|
||||
...(isGm ? [{ id: "mode-gm-tools", run: openGmAdmin }] : []),
|
||||
], [isGm, isRom, openClassHall, openDungeons, openGmAdmin, openManastorms, returnToCharacters]);
|
||||
const controller = useMenuController(actions, {
|
||||
initialId: "mode-dungeons",
|
||||
onBack: returnToCharacters,
|
||||
@@ -152,6 +157,20 @@ export function MainMenuScreen() {
|
||||
<p>Select a destination. More adventures will unlock here as they are built.</p>
|
||||
</header>
|
||||
<nav className="main-menu-mode-grid" aria-label="Game modes">
|
||||
{isGm && (
|
||||
<ControllerButton
|
||||
controlId="mode-gm-tools"
|
||||
selectedId={controller.selectedId}
|
||||
select={controller.select}
|
||||
className="front-button main-menu-mode main-menu-mode--available main-menu-mode--gm"
|
||||
type="button"
|
||||
onClick={openGmAdmin}
|
||||
>
|
||||
<b aria-hidden="true">GM</b>
|
||||
<span><strong>GM Tools</strong><small>Manage Manastorm rules, boss readiness, and encounter placement.</small></span>
|
||||
<em>Authorized</em>
|
||||
</ControllerButton>
|
||||
)}
|
||||
{isRom && (
|
||||
<ControllerButton
|
||||
controlId="mode-class-hall"
|
||||
|
||||
Reference in new issue
Block a user