Logo FSBarV1_Archived

EncyclopediaFilter Module

Pure predicate + helpers for the Units-tab encyclopedia filter (feature 044). Stateless — one source of truth for both render and tests.

Functions and values

Function or value Description

apply selection entries

Full Usage: apply selection entries

Parameters:
Returns: EncyclopediaEntry list

`entries |> List.filter (matches selection)` (order-preserving).

selection : EncyclopediaSelection
entries : EncyclopediaEntry list
Returns: EncyclopediaEntry list

defaultSelection

Full Usage: defaultSelection

Returns: EncyclopediaSelection

The canonical "no filters, no search" snapshot. Alias for `EncyclopediaSelection.defaults`.

Returns: EncyclopediaSelection

humanName entry

Full Usage: humanName entry

Parameters:
Returns: string

Canonical display-name derivation used by both the tab detail pane and the search-substring test.

entry : EncyclopediaEntry
Returns: string

matches selection entry

Full Usage: matches selection entry

Parameters:
Returns: bool

`true` iff `entry` passes every active category in `selection` AND the search text. Empty category = pass-all.

selection : EncyclopediaSelection
entry : EncyclopediaEntry
Returns: bool

toMobilityKey arg1

Full Usage: toMobilityKey arg1

Parameters:
Returns: MobilityFilterKey option

Map a viz-internal `MovementShape` into the Hub-UI chip key. `None` for values the Hub chooses not to expose (e.g. `Unknown`).

arg0 : MovementShape
Returns: MobilityFilterKey option

toTierKey arg1

Full Usage: toTierKey arg1

Parameters:
Returns: TierFilterKey option

Map a viz-internal `Tier` into the Hub-UI chip key. `None` for values the Hub chooses not to expose as a chip.

arg0 : Tier
Returns: TierFilterKey option

Type something to start searching.