cpu_next_hops
Survey legal next waypoints from a cell, listing each eligible hop with distance, owner, hub status, and transit fee, plus compass distance toward an optional destination.
Instructions
Survey the legal next waypoints from a cell (read-only). Lists every eligible waypoint — your revealed cells and every finished Hub — within one hop under the reach rule: hop ≤ radius(from)+radius(to)−1 grid steps (default balance: own↔own 1 = adjacent only, own↔hub 3, hub↔hub 5). A Hub counts only once its construction finishes: until then it grants no hub reach and charges no fee, and a foreign one is no waypoint at all — fromReady says whether your own origin is still building, which is why its reach may be smaller than you expect. Foreign cells are never waypoints, so even a single foreign cell between two plain cells is a WALL — only a finished Hub reaches across; empty hops means goods can only be hauled up to here. Facts per candidate: hop distance, owner, hub flag, ready build state, the exact per-unit transit fee for your resourceId cargo, and — with towards — the remaining grid distance (a compass, not a route). Planning is YOUR job: pick each hop yourself (cheap vs short vs whose hub you trust), chain them into path, and verify with cpu_quote_transport. To break a wall: build a border Hub (it still needs an eligible landing cell within reach on the far side), buy land across, or go around. WHEN: the cheap point check — call it right before each leg and after cpu_get_changes shows movement (hubs get demolished, fees change while goods travel); replan via cpu_route_network only when a local fix is impossible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | The cell to hop from (your revealed cell, or a Hub). | |
| towards | No | Optional destination — adds the remaining grid distance to it for each candidate (a compass). | |
| resourceId | Yes | The cargo resource id — each candidate hub shows its exact per-unit transit fee for it. |