CONTENT CONTRACT · VERSION 1
WorkStep
One instruction of a work plan. Targets and program positions are deterministic; all edges are checked at load.
Signature
{ action: (WorkAction)?, condition: (WorkCondition)?, damage_permille: (PositiveCount)?, days: (PositiveCount)?, enabled: (boolean)?, failure: (Count)?, gesture: (Name)?, materials: ({MaterialId})?, need: (Name)?, next: Count, op: WorkOp, query: (WorkQuery)?, status: (TextKey)?, tag: (TagId)?, ticks: (PositiveTicks)?, unreachable: (Count)? }Fields
| Name | Type | Meaning |
|---|---|---|
action | WorkAction | Shared world operation for use, or the operation fetch supplies. |
condition | WorkCondition | Predicate for branch. |
damage_permille | PositiveCount | Damage in thousandths of a standard tool hit. Range: 1…2147483647; Unit: count |
days | PositiveCount | Number of complete working days for an away instruction. Range: 1…2147483647; Unit: count |
enabled | boolean | Light switch. |
failure | Count | Instruction on failure; absent means retry this instruction. Range: 0…2147483647; Unit: count |
gesture | Name | Animation clip, using the equipped tool. Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$ |
materials | {MaterialId} | Material definitions accepted by find; each must declare terrain mining properties. Items: 1…8; Unique entries |
need | Name | What a report misses, shown over the resident as a lasting need cloud until its work goes on: need_seeds, need_beds, need_trees, need_chest, chest_full, need_path or need_supplies. Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$ |
next | Count | Zero-based next instruction. Range: 0…2147483647; Unit: count |
op | WorkOp | General instruction. |
query | WorkQuery | Target selector for find. |
status | TextKey | Localized visible state or missing condition. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
tag | TagId | Tag of a target structure. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: tag |
ticks | PositiveTicks | Wait or action duration; absent use duration comes from the actual tool. Range: 1…2147483647; Unit: tick |
unreachable | Count | Find and fetch edge when matching targets or storage exist but cannot be reached. Range: 0…2147483647; Unit: count |