Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/stations/

A station definition: a smart object that posts jobs on its chore board while it is enabled and not blocked, and the work a job does: a cycle whose length and output are numbers over the worker’s stats. Content turns each completed cycle’s event into items. An entity becomes one through the manifold-ai:station component, (def: "<key>", priority: 5). Loaded by the server only.

Registrymanifold-ai:station
Filesdata/stations/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsmanifold-ai:smart-object, manifold-ai:offline-model
ContractPopulation, data stage

Entry

A record, written Station(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe station’s key, <mod-id>:<name>.
smart_objectstringyesIts smart object definition (manifold-ai:smart-object key), which needs a slot with slot_tags. An unknown key fails the data stage (DATA010).
categorystringyesIts job category (manifold-ai:job-category key). An unknown key fails the data stage (DATA010).
postsPostPolicynoContinuous(max_open_jobs: 1)How it posts jobs.
slot_tagslist of stringno["slot.work"]The slot tags a job reserves.
workStationWorkyesThe work loop.
blocked_whencondition or NonenoneverA condition in the work context over the station’s facts that withdraws its jobs while it holds (Ext(atom: "manifold:station_has_tag", args: (tag: "station.state.full"))).
offlinestring or Nonenono offline workIts offline model (manifold-ai:offline-model key), for work done while nobody is near. An unknown key fails the data stage (DATA010).

Example

No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/stations/workbench.ron, which the data stage loads in its tests:

StationDef(
    id: "dataref-fixture:station/workbench",
    smart_object: "dataref-fixture:so/workbench",
    category: "dataref-fixture:job/carpentry",
    work: (cycle_secs: 30, output: "dataref-fixture:work/plank"),
)

Types

PostPolicy

How a station posts jobs.

VariantWrittenDescription
ContinuousContinuous(max_open_jobs: ..)Keeps jobs on the board while it posts.

Continuous fields:

FieldTypeRequiredDefaultDescription
max_open_jobsu8yesHow many, at least 1.

StationWork

A station’s work loop: numbers in the work context (This the worker, Target the station).

A record: StationWork(..) or (..).

FieldTypeRequiredDefaultDescription
cycle_secsnumberyesSeconds per cycle.
outputstringyesThe event key each completed cycle carries ("mymod:work/harvest"), which content turns into items. Also written Event("..").
qualitynumber or NonenononeThe output’s quality.
yield_multnumber or NonenononeThe output’s yield multiplier.

Value forms used here: condition, number.