export type MountKind = "ground" | "boat" | "flying" | "swimming"; export interface MountKit { kind: MountKind; moveSpeed?: number; turnSpeed?: number; } export interface MountSeat { id: string; offset: readonly [number, number, number]; control?: boolean; } export interface RideableConfig { id: string; kit: MountKit; seats?: readonly MountSeat[]; } export interface SeatRef { mountId: string; seatId: string; } export interface Occupant { riderId: string; seatId: string; } /** Occupancy only; register the world's rideables before restoring. */ export interface MountedRider extends SeatRef { riderId: string; } export type MountResult = { ok: true; seat: MountSeat; } | { ok: false; reason: string; }; /** * Mount / rideable control-transfer (issue #83). Registers rideables (each with one or more seats — a * control seat drives, the rest ride) and tracks who is on what. It owns no camera or physics: game code * reads `cameraTarget(riderId)` to point the follow camera at the mount, and `driveTarget(riderId)` to * route that rider's {@link import("../physics/vehicleBody.js").AxisInput}-driven input at the mount's * movement kit — the same seam a horse, a truck, or a shared multi-seat ship all plug into. */ export declare class MountController { private readonly mounts; private readonly seatOfRider; register(config: RideableConfig): void; isRegistered(mountId: string): boolean; kitOf(mountId: string): MountKit | null; seatsOf(mountId: string): readonly MountSeat[]; private firstFreeSeat; mount(riderId: string, mountId: string, seatId?: string): MountResult; dismount(riderId: string): string | null; seatOf(riderId: string): SeatRef | null; isSeated(riderId: string): boolean; seatOffset(riderId: string): readonly [number, number, number] | null; occupants(mountId: string): readonly Occupant[]; driver(mountId: string): string | null; /** Entity the follow camera should track for this rider: the mount when seated, else the rider. */ cameraTarget(riderId: string): string; /** * Entity this rider's input drives: the mount when in a control seat, `null` for a passenger seat * (they ride but do not steer), and the rider themselves when not mounted at all. */ driveTarget(riderId: string): string | null; snapshot(): MountedRider[]; /** Replace occupancy atomically. Invalid, unknown, or duplicate claims leave it unchanged. */ restore(next: readonly MountedRider[]): void; /** Release every rider, preserving authored registrations. */ reset(): void; } export declare function createMountController(): MountController;