From 96b4ccbe1dd45a5938028d5ce796c00aeb85c863 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Thu, 8 Oct 2026 10:43:53 +0200 Subject: [PATCH] docs/library.md: register puga.route and puga.planet in the module map Co-Authored-By: Claude Sonnet 5 --- docs/library.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/library.md b/docs/library.md index 3a8f8c4..d4d7248 100644 --- a/docs/library.md +++ b/docs/library.md @@ -45,6 +45,15 @@ EOF - **`puga.simulate`** — `simulate(plan, recipes, buildings, resources, fertility, price, ...)`: the PRUNplanner-simulator replica. Reuse this for anything plan-shaped rather than reimplementing efficiency/workforce/flows again. +- **`puga.route`** — `load_graph()`, `resolve_system(query)` (planet/system natural id or name + -> SystemId), `shortest_path(src, dst, graph=None)` (Dijkstra by straight-line ly over FIO's + `/systemstars` jump graph; returns jumps, distance_ly, path). Not a PRUNplanner feature, built + for this project since travel isn't modelled anywhere else. CLI: `tools/route.py`. +- **`puga.planet`** — `candidates(resource_ticker, min_factor=0.0)`: every planet with that + resource, sorted by extraction factor, each with temperature/pressure/gravity/fertility/faction + and `build_requirements` (FIO's own founding-cost materials for that specific planet — real + data, not guessed environment thresholds). CLI: `tools/planet.py`, pass `--from` an existing + base or pure-factor ranking is misleading (best-factor planets are often thousands of ly away). - **`puga.config`** — `get(key)` reads `.env`; `state_path()` returns the real `empire/state/company.yaml` if synced, else the tracked example.