Repository navigation
Draw the game's status icons and fill gauges on the board - #9
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Status_*_Desctext):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
ratedPlacementsrates the whole board in one pass; the readout'sratedPlacementAtnow goes through it.ratingShiftsreports whether each building was rated up or down.gameStatuses(indata/placements.ts) classifies each building the way the game does. Tile pads, the pulse and the readout counts keep using the existing three-wayPlacementStatus.PixiCanvascomputes 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/cooler8art.Testing
npm run checkandnpm run knipare clean; all tests pass, including new ones forgameStatuses,ratingShifts,placementFillPercentand the icon mapping.