import { type WalletState } from "../../economy/wallet.js"; import type { GameFeatures } from "../../game/defineGame.js"; import type { InventoryDeclaration } from "../../game/defineGame.js"; import type { GameEvents } from "../../game/events.js"; import { type Loadouts } from "../../game/loadout.js"; import { type InventoryLayout, type InventorySet, type ItemTraits } from "../../inventory/inventoryModel.js"; import { type PoseState } from "../../movement/poseState.js"; import { type Possession } from "../../scene/possession.js"; import type { EntityStore } from "../../scene/entityStore.js"; import { type StatValueMap } from "../../scene/entityStats.js"; import { type Stats } from "../../stats/statModifiers.js"; import { type MotionIntents } from "../motionIntents.js"; import type { GameContextEconomy, GameContextEntityEntry } from "../gameContext.js"; /** @internal Wiring player-owned state needs from the live context. */ export interface PlayerSubsystemDeps { signalNotify: () => void; inventoryDeclarations: Record; entities: EntityStore; events: GameEvents; catalogEntry: (instanceId: string) => GameContextEntityEntry | null | undefined; ensureInstanceStats: (instanceId: string) => StatValueMap; /** Reads another feature after descriptor install (loadout → unlocks). */ feature: (key: keyof GameFeatures) => T | undefined; } /** @internal Inventory, wallets, pose, motion, loadout — per-player state surfaces. */ export interface PlayerSubsystem { inventoryIds: readonly string[]; inventoryByUser: ReadonlyMap>; inventoryFor: (userId: string) => InventorySet; layouts: Record; /** Shared stack-limit/kind table for every declared inventory — also what object slot inventories validate against. */ itemTraits: ItemTraits; wallets: Map; walletOf: (userId: string) => WalletState; economy: GameContextEconomy; putIntoAnyInventory: (userId: string, itemId: string, count: number) => void; playerStatsFor: (userId: string) => Stats; pose: PoseState; possession: Possession; motionByUser: ReadonlyMap; motionFor: (userId: string) => MotionIntents; loadouts: Loadouts; seedUserPool: (userId: string, statId: string, pool: { current: number; max?: number; min?: number; }) => void; } /** @internal */ export declare function createPlayerSubsystem(d: PlayerSubsystemDeps): PlayerSubsystem;