Logo FSBarV1_Archived

SyntheticDataAdapter Module

Adapter from `FSBar.SyntheticData` scenes to the renderer's `UnitDisplay` input. Feature 028-unit-viz-language — MVP data source is synthetic only; a live-game adapter consuming `FSBar.Client.TrackedUnit` is a follow-up. The adapter uses a small lookup table over the known synthetic DefIds to populate `Shape`, `Faction`, `Tier`, and `LabelCode`. Unknown DefIds fall back to `Bot`/`Neutral`/`T1` with a `??` label and no hard failure.

Functions and values

Function or value Description

fromTrackedUnit scene frame unit'

Full Usage: fromTrackedUnit scene frame unit'

Parameters:
Returns: UnitDisplay

Convert one `TrackedUnit` in a given scene to a `UnitDisplay` with a deterministic synthetic heading and buildProgress derived from frame number and unit id.

scene : Scene
frame : int
unit' : TrackedUnit
Returns: UnitDisplay

toUnitDisplays scene frame

Full Usage: toUnitDisplays scene frame

Parameters:
Returns: UnitDisplay seq

Convert all units in one frame of a scene to `UnitDisplay` values.

scene : Scene
frame : GameState
Returns: UnitDisplay seq

Type something to start searching.