FacilityBonuses — Legacy Stub Status

FacilityBonuses is the interface attached to RunDefinition.context.facilities in data/run-config.ts. It is currently a legacy stub: the type still exists and is referenced by run assembly, but every field is zero at runtime.

Current behavior

assembleRunService (in services/assembleRunService.ts) builds the per-run facilities object by spreading DEFAULT_RUN.context.facilities:

// Buildings disabled — facilities stay at default zeros, supplyLevel stays 0.
const facilities: FacilityBonuses = { ...DEFAULT_RUN.context.facilities };
const supplyLevel = 0;

No code path in run assembly mutates facilities or supplyLevel away from those defaults. Every field — additive percentages (weaponDamagePct, xpBonusPct, arcadeCreditsPct, missionRewardPct, …), time-reduction percentages (buildTimePct, moveTimePct, upgradeTimePct, gemSkipCostPct, missionDurationPct), counts (missionBoardSlots, missionShipSlots), and the elite-rarity cap (eliteRarityCap) — is whatever DEFAULT_RUN defines, which is zero / null.

Why it still exists

The interface was intended for a base-building metagame: buildings such as Refinery (build-time reductions), Yard / Port (mission credits, ship-drop chance, mission duration), Lab (assigned-weapon damage), Hangar (assigned-hull bonuses), Barracks (enemy density + elite-rarity cap), Archive (chest rewards, challenge XP), Array / Foundry / Beacon (world-event spawn rate, event-reward quality), and Relay (mission success chance, board slots, ship slots, mission rewards). Field docstrings still call out the originating buildings.

That entire systems feature was removed. The shape was preserved so:

  • RunDefinition.context.facilities still type-checks for any consumer that reads it.
  • Reintroducing meta-progression bonuses later does not require re-threading a new field through every consumer of RunDefinition.

Implications

  • Any system that reads from context.facilities.* will always see zeros. Treat reads as no-ops — do not add new gameplay branches keyed on these fields without first replacing the stub.
  • supplyLevel (sibling of facilities on RunDefinition.context) is similarly forced to 0 in assembleRunService. It controls XP-crate count at run start; with the buildings feature gone, runs start with no facility-granted supply crates.
  • CodexBonuses (the sibling context.codex field) is a separate system and is not zeroed by the same logic — do not conflate the two.
  • data/run-config.tsFacilityBonuses interface definition (weaponDamagePct, xpBonusPct, arcadeCreditsPct, missionCreditsPct, buildTimePct, moveTimePct, upgradeTimePct, gemSkipCostPct, worldEventSpawnPct, chestRewardPct, challengeXpPct, missionSuccessChancePct, missionBoardSlots, missionShipSlots, missionRewardPct, missionDurationPct, shipDropChancePct, eventRewardQualityPct, hullRolePackagePct, hullMissionContributionPct, weaponDamageBonusPct, enemyCountPct, eliteRarityCap, plus legacy upgradeChoicesBonus, dropRarityBonus, objectiveBonusPct).
  • services/assembleRunService.ts — the single site that constructs the per-run facilities object and forces it to defaults.
  • gameplay/concepts/assemble-run.md — overall run-assembly pipeline.
  • gameplay/concepts/codex-bonuses.md — the live sibling meta-bonus system that is wired up.