From b34144eef8dc9e454c5084d8c2bdf856e99a9d90 Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Fri, 21 Aug 2026 12:05:20 -0400 Subject: [PATCH] docs(forces): the index covers what a match fields, and who names the release Two items closed and two corrected. The index widening said Meks were all there was, which stopped being true; the sprite-path item and the version item each had half of them land, and now say which half. Co-Authored-By: Claude Opus 5 (1M context) Change-Id: If819a7604abf99947f20b5130439af42b74deaa2 --- plan/forces.md | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/plan/forces.md b/plan/forces.md index e36b1f6..7b270a8 100644 --- a/plan/forces.md +++ b/plan/forces.md @@ -88,24 +88,18 @@ which picture belongs to which design out of `mekset.txt`, since nothing in the tree says so. A screen that draws a unit needs an address, and `web/src/megamek.ts` is the one place that builds one. -- [ ] **Widen the index past Meks.** `helm index` emits 4,279 designs and - every one of them is a Mek, so a Vedette on a match report draws - MegaMek's generic tracked silhouette while `vehicles/Vedette.png` sits - in the same bucket — `mekset.txt` has 7,940 mapping lines covering every - unit type, and helm reads all of them for `helm art`. Until then a - vehicle, a platoon and a fighter are drawn as their class. - [ ] **Carry the sprite path in the index** rather than in a generated map beside the catalog. `web/src/scenario/unit-art.ts` names 61 units because - the scenario catalog names 61; a force manager can offer 4,279, and the - answer for each of them is a column helm already knows how to fill. - The index already carries the column — `helm index` reports - `without_sprite: 0` — and the API reads it (below). What is left is the - browser doing the same and `unit-art.ts` going away with it. + the scenario catalog names 61, and the front page, the challenge screen + and the lobby all draw from it. The index carries the column for all + 8,456 designs and the API already reads it; what is left is the browser + doing the same and that file going away. - [ ] **Pin the version to what a match runs.** `MEGAMEK_VERSION` in `web/src/megamek.ts` is a constant today and arena's pin is the truth, so - a bump is two edits with a sync between them. The index is stamped with - the release it was built from, which is where the version should come - from once a screen reads one. + a bump is two edits with a sync between them. The API reports the + version off the index now, so the value is there to be read — what is + left is the call sites: `unitSprite` and `megamekAsset` are synchronous + and every screen that draws a sprite calls them that way. ## The force manager @@ -216,6 +210,22 @@ where a player brings something. ## Done +- [x] **The index covers what a match fields.** `helm index` emitted Meks + alone, so a Vedette on a match report drew MegaMek's generic tracked + silhouette while `vehicles/Vedette.png` sat in the same bucket. It + carries the four classes `helm-bv` can price now — 8,456 designs against + 0.51.0, 302KB gzipped — and the line it draws is what can be priced + rather than what can be drawn: every design has a battle value, and the + 99 with no `mekset.txt` entry keep the default silhouette MegaMek draws + them with. Battle armour is the one class with art for every design. +- [x] **A screen reads the release rather than naming one.** helm keys its + artifacts by its own release and then by the MegaMek they describe, and + `web/src/megamek.ts` used to name a release in its own source — so a + helm deploy needed a matching site build, and without one the force + builder and the match reports read different indexes with nothing to + say so. `/api/version` reports what the API loaded, off the index + document, and the site asks. The constants are the fallback. + - [x] **The match report reads the index.** `services/api/src/units.rs` fetches `UNIT_INDEX_URL` once at startup and keeps two columns: a design's name and the sprite helm resolved for it. Both halves of the -- 2.51.2