refactor: simplify ManaStatsSection props from 17 fields to single stats object
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
This commit is contained in:
@@ -5,15 +5,13 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Droplet } from 'lucide-react';
|
||||
import type { ComputedEffects } from '@/lib/game/effects/upgrade-effects.types';
|
||||
|
||||
interface ManaStatsSectionProps {
|
||||
export interface ManaStatsData {
|
||||
maxMana: number;
|
||||
baseRegen: number;
|
||||
effectiveRegen: number;
|
||||
clickMana: number;
|
||||
meditationMultiplier: number;
|
||||
upgradeEffects: ComputedEffects;
|
||||
elemMax: number;
|
||||
// Special effect flags passed separately
|
||||
incursionStrength: number;
|
||||
rawMana: number;
|
||||
hasSteadyStream: boolean;
|
||||
@@ -26,27 +24,31 @@ interface ManaStatsSectionProps {
|
||||
hasEternalFlow: boolean;
|
||||
}
|
||||
|
||||
interface ManaStatsSectionProps {
|
||||
stats: ManaStatsData;
|
||||
elemMax: number;
|
||||
}
|
||||
|
||||
export function ManaStatsSection({ stats, elemMax }: ManaStatsSectionProps) {
|
||||
const {
|
||||
maxMana,
|
||||
baseRegen,
|
||||
effectiveRegen,
|
||||
clickMana,
|
||||
meditationMultiplier,
|
||||
upgradeEffects,
|
||||
incursionStrength,
|
||||
rawMana,
|
||||
hasSteadyStream,
|
||||
hasManaTorrent,
|
||||
hasDesperateWells,
|
||||
manaCascadeBonus,
|
||||
manaWaterfallBonus,
|
||||
hasFlowSurge,
|
||||
hasManaOverflow,
|
||||
hasEternalFlow,
|
||||
} = stats;
|
||||
|
||||
export function ManaStatsSection({
|
||||
maxMana,
|
||||
baseRegen,
|
||||
effectiveRegen,
|
||||
clickMana,
|
||||
meditationMultiplier,
|
||||
upgradeEffects,
|
||||
elemMax,
|
||||
incursionStrength,
|
||||
rawMana,
|
||||
hasSteadyStream,
|
||||
hasManaTorrent,
|
||||
hasDesperateWells,
|
||||
manaCascadeBonus,
|
||||
manaWaterfallBonus,
|
||||
hasFlowSurge,
|
||||
hasManaOverflow,
|
||||
hasEternalFlow,
|
||||
}: ManaStatsSectionProps) {
|
||||
return (
|
||||
<Card className="bg-[var(--bg-panel)] border-[var(--border-subtle)]">
|
||||
<CardHeader className="pb-2">
|
||||
|
||||
Reference in New Issue
Block a user