Skip to content

core/quests/sources/repair.ts ​

Generated from the exports of core/quests/sources/repair.ts · npm run docs:gen

Repair quests generated from the map (PLAN-V2 §2.1, lot Q2): an entity of a repairable kind in error or degraded opens one repair quest, proven by the map itself (check entity, never declarable). incomplete opens none in v1: it is missing configuration, already covered by the campaign. Life cycle (the core's record() writes the incidents): the entity heals → the quest is done, 40 xp once per incident, and it stays shown as done for 24 h; a relapse within 24 h is the same incident (no second xp); the entity leaves the map → the quest is removed, without xp.

Standards that cite this file: No standard page cites this file yet.

Exports ​

REPAIR_BRANCH const ​

ts
const REPAIR_BRANCH = "_repair"

REPAIRABLE const ​

Kinds that can be repaired (PLAN-V2 §2.1).

ts
const REPAIRABLE: readonly EntityKind[]

BROKEN const ​

States that open a repair.

ts
const BROKEN: readonly EntityState[]

HEALTHY const ​

What the map shows once it is healthy again.

ts
const HEALTHY: EntityState[]

repairUid const ​

ts
const repairUid = (entityId: string) => …

isBroken const ​

ts
const isBroken = (e: Entity) => …

repairGiver function ​

Who gives the quest: the entity's own role, else the Operator for an automation, the Architect otherwise.

ts
function repairGiver(e: Entity): string

repairQuest function ​

ts
function repairQuest(e: Entity, say: Say, since?: string): QuestDef

repairBranch function ​

The repair branch for this map and this save: a quest for each broken entity, and for each entity still on the map whose incident is open (it just healed: the core sees it done and gives the xp) or was solved within 24 h.

ts
function repairBranch(world: WorldState, save: Save, now: number, say: Say): Branch | null

The standard, the SDK and the CLI are Apache-2.0; Alta System OS and Alta World are FSL-1.1-ALv2.