export type MoodleSeverity = "good" | "neutral" | "warning" | "critical"; export type MoodleSource = "meter" | "ailment" | "buff"; /** One survival moodle (status icon) — severity, source, and label for HUD chips. */ export interface Moodle { id: string; label: string; severity: MoodleSeverity; source: MoodleSource; stacks: number; icon?: string; /** 0..1 progress ring — remaining buff time, wound treatment, meter fill. Absent = no ring. */ fraction?: number; /** Free-form note surfaced under the label (e.g. "-3°C", "needs bandage"). */ note?: string; } export declare const MOODLE_SEVERITY_ORDER: Record; /** * Merge any number of moodle groups into one stack — meters, ailments, and buffs * share this display. Same-id moodles fold together (stacks add, worst severity wins); * the result is ordered worst-first so the HUD reads critical statuses at a glance. */ export declare function stackMoodles(...groups: readonly (readonly Moodle[])[]): Moodle[]; export interface TimedMoodleInput { id: string; label: string; severity?: MoodleSeverity; icon?: string; note?: string; stacks?: number; /** Game-seconds until the moodle drops. Omit for a moodle that stays until removed. */ duration?: number; } /** Ordered stack of active moodles derived from meters/ailments/buffs. */ export interface MoodleStack { /** Add or refresh a timed moodle (Valheim food buff, a temporary shelter status). */ add(input: TimedMoodleInput): void; remove(id: string): void; has(id: string): boolean; /** Advance timers by a game-time delta; drops expired moodles. */ tick(dt: number): void; /** The live timed moodles (buffs, temporary statuses). */ list(): Moodle[]; clear(): void; } /** * A stateful holder for timed status moodles (food buffs, temporary shelter, warmth). * Meters and multi-region health derive their own moodles on read; combine all three * through `stackMoodles(stack.list(), meterMoodles, ailmentMoodles)` for one display. */ export declare function createMoodleStack(): MoodleStack;