Skip to content

rings beta ​

Function of @v12-engine/engine/ai

ts
export declare function rings(ai: Brain, type: UnitTypeDef, centre: Vec2, options: {
    from?: number;
    within: number;
    ordinal?: number;
    inward?: boolean;
    accept?: (point: Vec2) => boolean;
}): Vec2 | undefined;

The rings around a place, walked out from from to within (then in from from to the nearest ring where inward), each at so many angles; the first point that stands clear and that accept likes. Deterministic, but not the same corner for every building: the angles start where ordinal says. Nothing a worker cannot walk to