1681-engine / index / NavGoal
Type Alias: NavGoal ​
ts
type NavGoal =
| {
reach?: number;
x: number;
y: number;
}
| {
estimate?: (tx, ty) => number;
test: (tx, ty) => boolean;
};Defined in: src/nav/findPath.ts:11
Where a path ends. A point goal is met anywhere within reach tiles of its tile (centre to centre; 0 = that tile only): aiming at an exact tile sent auto-walks into a spot inside a hut and left them shuffling against its wall a step from where they were already close enough. A custom goal names its own tiles, with an estimate of the tiles left that must never be more than the real cost (0, the default, makes the search a plain Dijkstra).