resources.ts

Resource tag definitions for the building system. Tags are placement permission flags, not stockpiled currencies.

Purpose

Gates which buildings can be placed in which systems. Each system has 1–2 tags, and buildings require specific tag combinations. Tags are unlocked by clearing the first system carrying that tag. Once unlocked, a tag is permanently available for building placement and Converter/Projector use.

Exports

ExportKindValue / Shape
ResourceTagtype alias'ore' | 'fuel' | 'crystal' | 'relic'
ALL_RESOURCE_TAGSreadonly ResourceTag[]['ore', 'fuel', 'crystal', 'relic'] (progression order)
RESOURCE_TAG_NAMESRecord<ResourceTag, string>display names
RESOURCE_TAG_THEMESRecord<ResourceTag, string>tooltip themes

Tags

TagDisplayTheme
oreOreIndustry, salvage, hull work
fuelFuelRouting, docks, timers, logistics
crystalCrystalPrecision, tech, labs, optics
relicRelicAncient, sacred, endgame infrastructure

Semantics

  • Not currencies. No stockpile, no consumption — purely boolean placement permissions.
  • Progression order is ore → fuel → crystal → relic (index in ALL_RESOURCE_TAGS).
  • Unlock mechanism: clearing the first system tagged with a given tag permanently unlocks that tag.
  • Consumers: building placement validators, Converter/Projector mechanics, system-tag definitions.

Notes for designers

  • Tag set is closed (four entries). Adding a fifth requires extending ResourceTag, the two record maps, and the progression-order array together.
  • RESOURCE_TAG_THEMES strings are the contract for UI tooltips — keep them short.