screeps-cartographer
Version:
An advanced (and open source) movement library for Screeps
20 lines (19 loc) • 711 B
TypeScript
/// <reference types="screeps" />
import { MoveOpts } from '../';
import { PortalSet } from './portals';
/**
* Uses findRoute to create a base route, then enhances
* it by adding rooms (up to maxRooms) to improve pathfinding
*/
export declare function findRoute(room1: string, targetRooms: string[], opts?: MoveOpts): {
rooms: string[];
portalSet?: PortalSet;
}[] | undefined;
/**
* Returns a sequence of rooms. Exits between rooms may be normal room exits or a portal set.
*/
export declare function findRouteWithPortals(fromRoom: string, toRooms: string[], opts?: RouteOptions, avoidPortals?: boolean): {
room: string;
exit?: ExitConstant;
portalSet?: PortalSet;
}[][] | ERR_NO_PATH;