fix: bugs #238,#240,#244,#246 + docs #248 update
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- #238: Fix spire tab inconsistent state (Max Floor 1 but Floors Cleared 0) by not inflating maxFloorReached on enterSpireMode and preserving it on exitSpireMode - #240: Fix guardian armor display stray text by extracting stat formatters in SpireSummaryTab - #244: Improve discipline auto-pause UX with log messages and visual feedback on DisciplineCard - #246: Fix raw mana exceeding max cap by recomputing maxMana after discipline XP gains - #248: Update AGENTS.md (remove gitea_get_project_boards, add gitea_start_session, 22 mana types, 8 stores, updated guardian tiers) - #248: Update README.md (remove Prisma/SQLite refs, update mana types/guardian tiers/discipline counts) - #248: Update GAME_BRIEFING.md (8 stores, 22 mana types, 64 disciplines, 8-tier guardians, correct code architecture)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useCallback } from 'react';
|
||||
import { useDisciplineStore } from '@/lib/game/stores/discipline-slice';
|
||||
import type { DisciplineDefinition } from '@/lib/game/types/disciplines';
|
||||
import type { DisciplineDefinition, DisciplineState } from '@/lib/game/types/disciplines';
|
||||
import { baseDisciplines } from '@/lib/game/data/disciplines/base';
|
||||
import { elementalAttunementDisciplines } from '@/lib/game/data/disciplines/elemental';
|
||||
import { elementalRegenDisciplines } from '@/lib/game/data/disciplines/elemental-regen';
|
||||
@@ -40,7 +40,7 @@ const ATTUNEMENT_TABS: AttunementTab[] = [
|
||||
|
||||
interface CardWrapperProps {
|
||||
disc: DisciplineDefinition;
|
||||
disciplines: Record<string, { xp: number; paused: boolean }>;
|
||||
disciplines: Record<string, DisciplineState>;
|
||||
activeIds: string[];
|
||||
concurrentLimit: number;
|
||||
elements: ReturnType<typeof useManaStore.getState>['elements'];
|
||||
@@ -58,6 +58,7 @@ const CardWrapper: React.FC<CardWrapperProps> = ({
|
||||
definition={disc}
|
||||
xp={discState.xp}
|
||||
paused={discState.paused}
|
||||
autoPaused={discState.autoPaused}
|
||||
activeIds={activeIds}
|
||||
concurrentLimit={concurrentLimit}
|
||||
isLocked={!prereqCheck.canProceed}
|
||||
@@ -83,17 +84,16 @@ export const DisciplinesTab: React.FC = () => {
|
||||
|
||||
const [activeAttunement, setActiveAttunement] = useState<string>('base');
|
||||
|
||||
const rawMana = useManaStore((s) => s.rawMana);
|
||||
const elements = useManaStore((s) => s.elements);
|
||||
const signedPacts = usePrestigeStore((s) => s.signedPacts);
|
||||
|
||||
const handleToggle = useCallback((id: string, paused: boolean) => {
|
||||
if (paused) {
|
||||
activate(id, { elements, signedPacts, rawMana });
|
||||
activate(id, { elements, signedPacts });
|
||||
} else {
|
||||
deactivate(id);
|
||||
}
|
||||
}, [activate, deactivate, rawMana, elements, signedPacts]);
|
||||
}, [activate, deactivate, elements, signedPacts]);
|
||||
|
||||
const activeTab = ATTUNEMENT_TABS.find((t) => t.key === activeAttunement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user