Skip to main content

Module aggregate

Module aggregate 

Source
Expand description

Parallel-Aggregate cache for tree contributions.

bought: HashSet<TreeCoord> on UpgradeTreeState is the source of truth. This TreeAggregate is the derived cache read by the FPS / click / powerup hot paths. Rebuilt on load and incrementally updated on buy / refund. Reads are O(1) regardless of how many nodes the player owns — the per-tick FPS calc never iterates the bought set.

Structs§

FingererTreeContrib
Per-fingerer contribution from the tree. Mirrors FingererAggregate (additive percent sums, mul factor multiplies, flat sums) so the FPS formula combines tree + modifier contributions symmetrically.
TreeAggregate
All of the tree’s contributions, pre-folded into a single struct for O(1) reads on the hot paths.