Skip to content

Draw the game's status icons and fill gauges on the board - #9

Merged
OGMods merged 2 commits into
mainfrom
board-status-icons
Oct 17, 2026
Merged

OGMods merged 2 commits into
mainfrom
board-status-icons

Conversation

@OGMods

@OGMods OGMods commented Oct 17, 2026

Copy link
Copy Markdown
Owner

What this adds

Each building on the board now shows the same overlays the game draws, using the game's own art pulled from its files:

  • State icon, following the game's own status definitions (its Status_*_Desc text):
    • red triangle: offline, nothing it can work with is adjacent (e.g. a generator with no heat source beside it)
    • zzz: idle, partners are adjacent but don't need it
    • warning thermometer: overheated, waste heat isn't covered, so it shuts down
    • gauge: wasting heat, a generator at full capacity beside a reactor with more than 10% of its heat unused
    • nothing over a building that's working
  • Anomaly icon at the building's foot: Singularity's boosted/downgraded icons, Tidal's wave, Cryo's cooler icon. It appears only where the scorer rated that building above or below its plain tier, so it marks exactly the buildings the anomaly affected.
  • Fill gauge ("70%"): how hard the building is working, measured against the same ceiling the readout prints, so the two always agree. It sits on a see-through pill with the game's dial icon and can be turned off in Settings → Building gauges.

Icon positions and sizes come from the game's building template. The icons ship as files in public/icons/ and the extractor regenerates them.

How it's built

  • ratedPlacements rates the whole board in one pass; the readout's ratedPlacementAt now goes through it.
  • ratingShifts reports whether each building was rated up or down.
  • gameStatuses (in data/placements.ts) classifies each building the way the game does. Tile pads, the pulse and the readout counts keep using the existing three-way PlacementStatus.
  • PixiCanvas computes the overlays and the painter only draws them, in their own layer so a taller neighbour can't hide them.

Also contains a separate commit with the 1.1.11 re-extract of the cooler7/cooler8 art.

Testing

  • npm run check and npm run knip are clean; all tests pass, including new ones for gameStatuses, ratingShifts, placementFillPercent and the icon mapping.
  • Checked in the browser on a Singularity board, a Tidal board, and a hand-built board containing each state.
  • Not yet tried by hand: flipping the Settings switch, and the 10% wasting-heat threshold against the real game (the threshold is from observed play, not read from the game files).

Game 1.1.11 redrew the top two coolers: cooler7's sprite changed size and
cooler8's changed outright, so both icons and their atlas frames move. The
rest of the sheet is unchanged; the extractor kept every noise-only sprite.
Every building now carries the overlays the game draws on it, in the game's
own art read out of its files:

- A state icon, by the game's own definitions (its Status_*_Desc terms):
  a red triangle when nothing it can work with is adjacent (offline), zzz
  when partners are adjacent but do not need it (idle), the overheated
  thermometer for a power source its cooling does not cover, and the gauge
  for a full generator beside a reactor leaving over a tenth of its heat
  (wasting heat). Working buildings carry nothing.
- The anomaly icon at the building's foot: Singularity's boosted and
  downgraded icons, Tidal's wave, Cryo's cooler icon. It shows exactly where
  the scorer rated a building off its plain tier (ratingShifts), so it can
  only mark buildings whose figures the anomaly actually moved.
- A fill gauge ("70%"): what the building is doing as a fraction of what its
  tile rates it for -- the readout's own ceiling, so the two agree. On a
  see-through pill with the game's dial; switchable in Settings.

The board rates every building in one pass (ratedPlacements), which the
readout's single-tile ratedPlacementAt now goes through as well. The pads,
the pulse and the readout's counts keep the three-way PlacementStatus; the
icons use the finer gameStatuses.

Icon positions come from the game's building prefab. The icons ship as loose
files in public/icons, written by the extractor like every other badge.
@OGMods
OGMods merged commit b0009d4 into main Oct 17, 2026
3 checks passed
@OGMods
OGMods deleted the board-status-icons branch October 17, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant