Crafting — Core / Contracts¶
Folder Overview¶
This folder contains the public data contracts used to interact with the Crafting system.
Types in this folder are:
- stable
- serializable where appropriate
- safe for external consumption
- free of side effects and service logic
They define what callers can request, what the service reports, and how results are described, without exposing internal implementation details.
What Lives Here¶
Requests¶
CraftRequestInput parameters for enqueueing crafts. Supports single or batched execution and captures owner, recipe, count, container override, station tag, and user data.
Preflight Results¶
-
CraftCheckResult of a detailed preflight evaluation. Reports maximum craft count and blocking reason. -
CraftProbeBreakdown of preflight limits for UI and tooling (items, currency, space).
These types describe capability, not execution.
Jobs & Persistence¶
-
CraftJobRuntime record of an accepted craft or batch. Read-only to consumers. -
CraftJobSnapshotSerializable snapshot used for save/load and offline progress. -
CraftJobStateDiscrete job states (Queued, Running, Paused, Completed, Cancelled, Failed).
Enums & Configuration¶
-
CraftFailReasonExplicit reasons a craft cannot proceed. Used across preflight, runtime, and events. -
CraftTimeModeDeclares which time source the service uses. -
CraftPreflightOptionsOptional overrides for container and station context during preflight.
Purpose¶
These contracts provide a stable boundary for:
- requesting crafting operations
- inspecting preflight capability
- observing job state and lifecycle
- persisting and restoring crafting progress
They allow interaction with the Crafting system without exposing internal behaviour.
Usage Guidance¶
Callers¶
- treat contract types as descriptive, not authoritative
- do not rely on internal ordering or timing
- use
CraftFailReasonfor UI and feedback
Persistence¶
- use
CraftJobSnapshotfor save/load - provide ID mapping for owners and recipes
- snapshots represent already-accepted jobs
Important Notes¶
- contracts do not perform behaviour or side effects
- behaviour is defined by the Crafting service
- fields may be extended without breaking existing usage
Not for Production Use¶
This folder defines contracts, not the code behind them
This folder does not include:
- service logic
- adapter interfaces
- validation or modifier behaviour
Related Documentation¶
- Crafting Core (runtime behaviour)
- Crafting Context (data flow through evaluation)
Public API¶
All types in this folder are part of the supported Crafting API surface.
They are intended for use by:
- gameplay code
- UI layers
- teaching tools
- external integrations
Design Notes¶
- data-focused types
- no service logic or side effects
- suitable for serialization and inspection
If behaviour is required, it belongs in the service or integration layers.