import { type DeathSystem } from "../../combat/death.js"; import { type CombatSpatialDeps, type EffectSystem } from "../../combat/effects.js"; import { type ProjectileSystem, type ProjectileTravelDeps } from "../../combat/projectiles.js"; import type { PhysicsConfig } from "../../game/defineGame.js"; import type { GameEvents } from "../../game/events.js"; import { type VfxInstanceStore } from "../../game/vfxInstance.js"; import type { LootRegistry } from "../../game/lootTable.js"; import { type EntityColliderSet } from "../../scene/colliders.js"; import type { EntityStore } from "../../scene/entityStore.js"; import type { ObjectStore } from "../../scene/objectStore.js"; import type { SceneRaycastApi } from "../../scene/sceneRaycast.js"; import type { WeaponStats } from "../../item/weapon.js"; import type { SimClock } from "../../time/simClock.js"; import type { WorldItemRecord, WorldItemSpawnInput } from "../../game/worldItem.js"; import type { GameContextContent, GameContextEntityEntry, GameContextLoot } from "../gameContext.js"; import { type CombatFx } from "./combatFx.js"; /** @internal Wiring combat needs from the live scene, loot, and command seams. */ export interface CombatSubsystemDeps { content: GameContextContent; signalNotify: () => void; now: () => number; events: GameEvents; time: SimClock; entities: EntityStore; objects: ObjectStore; combatSpatial: CombatSpatialDeps; sceneRaycast: SceneRaycastApi; entityCollidersOf: (instanceId: string) => EntityColliderSet | null; objectCollidersOf: (instanceId: string) => EntityColliderSet | null; catalogEntry: (instanceId: string) => GameContextEntityEntry | null | undefined; statsByInstance: Map; weapon: WeaponStats; loot: GameContextLoot; lootRegistry: LootRegistry; spawnWorldItem: (input: WorldItemSpawnInput) => WorldItemRecord; despawnEntity: (instanceId: string) => boolean; runCommand: (name: string, args: unknown, actorUserId?: string) => void; userIdOf: (instanceId: string) => string | undefined; rng: () => number; physics?: PhysicsConfig; projectileTravel?: Pick & { /** Bounded collision source; omit for the context's entities. */ targets?(): readonly string[]; /** Reject an oversized collision source rather than silently missing targets. Default 2048. */ maxTargets?: number; }; } /** @internal Effects, projectiles, death, and combat presentation surface. */ export interface CombatSubsystem { death: DeathSystem; effects: EffectSystem; floatingEffects: EffectSystem; projectiles: ProjectileSystem; combatFx: CombatFx; vfxInstances: VfxInstanceStore; captureProjectileTargets(gameDt: number): void; } /** @internal */ export declare function createCombatSubsystem(d: CombatSubsystemDeps): CombatSubsystem;