Fix ThreatCostCalculator: per-unit division, scrap fallback, fixpoint, staggered-recipe max

This commit is contained in:
2026-07-08 20:28:31 +02:00
parent c6db4bf24a
commit 5b86b15c71
6 changed files with 333 additions and 98 deletions

View File

@@ -23,10 +23,11 @@ Reads recipes.toml, ships.toml, modules.toml, and world.toml and prints:
5. Belt feasibility — input demand in items/s per building vs. the
single-belt cap (belt_speed_mps / tile_size_m, in items/s).
NOTE: the per-unit division (1) and the scrap fallback rule are the
agreed design semantics (see docs/progression_design.md action items);
src/lib/sim/ThreatCostCalculator.cpp does not implement them yet. Until
it does, this report is the design reference, not a mirror of the game.
NOTE: the semantics described above — per-unit division, scrap fallback
rule, fixpoint resolution including reprocessing, and the commit-all-
recipes max rule — are implemented in both this script and in
src/lib/sim/ThreatCostCalculator.cpp. The two should produce identical
values for any given config.
Usage (from the repository root or anywhere else):