screeps-cartographer
Version:
An advanced (and open source) movement library for Screeps
21 lines (20 loc) • 730 B
TypeScript
/**
* Checks if the reconcile function has run recently. If not, creeps will
* fall back to unmanaged movement to preserve some functionality.
*/
export declare function reconciledRecently(): boolean;
export interface ReconcileTrafficOpts {
/**
* Show debug visualizations for troubleshooting traffic
*/
visualize?: boolean;
}
/**
* Include this function in your main loop after all creep movement to enable traffic
* management.
*
* Warning: if your bucket overflows and this doesn't run, your creeps will not move.
* Creeps will fall back to unmanaged movement if the reconcileTraffic is not executed
* after two ticks.
*/
export declare function reconcileTraffic(opts?: ReconcileTrafficOpts): void;