/// import { RoomName } from "../position/types"; import { SomeRoomPosition } from "../position/utils"; import { RoomMatrixOpts } from "../room/matrix"; export type IN_RANGE = 1; export declare const IN_RANGE = 1; type GoToMemory = [ destRoom: string, destX: number, destY: number, range: number, priority: number, prevX: number, prevY: number, lastMove: number, path: string ]; export interface FindGoToPathOpts extends FindPathOpts, RoomMatrixOpts { range?: number; /** user provider path */ path?: RoomPosition[]; excludeRoom?: (n: RoomName) => boolean; } export interface GoToOpts extends FindGoToPathOpts, MoveToOpts { usedCapacity?: number; priority?: number; noPush?: boolean; ret?: GoToReturn; } export interface GoToReturn { path?: PathFinderPath; searches?: number; ops?: number; } /** * Compute path with {@link goTo} options. * @param from initial position * @param to target position * @param opts parameters * @param roomMatrixCache cache for room matrices * @returns a path to the target */ export declare function findGoToPath(from: RoomPosition, to: RoomPosition, opts: FindGoToPathOpts & { efficiency: number; }, roomMatrixCache?: {}): PathFinderPath | { path: RoomPosition[]; }; /** * Read {@link goTo} cached path from creep memory * @param c target creep * @param to destination to check * @param getMemory same as {@link goTo} * @param limit max positions to deserialize * @returns a cached path */ export declare function getGoToPath(c: Creep, to: RoomPosition, getMemory: (c: Creep) => GoToMemory | [], limit?: number): RoomPosition[]; /** * {@link Creep.moveTo} with smart push * @param c target creep * @param target destination * @param getMemory get a persistant array of data for a given creep. `c => c.memory._m ?? []` * @param roomMatrixCache cache for room matrices * @param opts movement parameters * @returns status code */ export declare function goTo(c: Creep, target: SomeRoomPosition, getMemory: (c: Creep) => GoToMemory | [], roomMatrixCache?: {}, opts?: GoToOpts): ScreepsReturnCode | IN_RANGE; export {};