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
| Export | Kind | Value / Shape |
|---|---|---|
ResourceTag | type alias | 'ore' | 'fuel' | 'crystal' | 'relic' |
ALL_RESOURCE_TAGS | readonly ResourceTag[] | ['ore', 'fuel', 'crystal', 'relic'] (progression order) |
RESOURCE_TAG_NAMES | Record<ResourceTag, string> | display names |
RESOURCE_TAG_THEMES | Record<ResourceTag, string> | tooltip themes |
Tags
| Tag | Display | Theme |
|---|---|---|
ore | Ore | Industry, salvage, hull work |
fuel | Fuel | Routing, docks, timers, logistics |
crystal | Crystal | Precision, tech, labs, optics |
relic | Relic | Ancient, sacred, endgame infrastructure |
Semantics
- Not currencies. No stockpile, no consumption — purely boolean placement permissions.
- Progression order is
ore → fuel → crystal → relic(index inALL_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_THEMESstrings are the contract for UI tooltips — keep them short.