Typed result object for craft validation/execution. Every outcome category is a stable [StringName] reason code (use the REASON_ constants, never raw literals). Successful results carry exact consumed/produced facts; rejected results carry a stable reason plus a nested [CraftingInventoryOutcome] preserving Item Vault's typed reason when a mutation was involved.
Source: addons/item_vault/crafting/results/crafting_result.gd
Syntax
class CraftingResult extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
SCHEMA_VERSION | Field | Schema version of this result shape. |
REASON_INVALID_RECIPE | Field | |
REASON_INVALID_QUANTITY | Field | |
REASON_MISSING_INVENTORY | Field | |
REASON_INVALID_INVENTORY | Field | |
REASON_ITEM_DEFINITION_UNAVAILABLE | Field | |
REASON_MISSING_INGREDIENT | Field | |
REASON_INSUFFICIENT_QUANTITY | Field | |
REASON_OUTPUT_CAPACITY_UNAVAILABLE | Field | |
REASON_TRANSACTION_REJECTED | Field | |
REASON_TRANSACTION_ROLLBACK | Field | |
REASON_STALE_STATE | Field | |
REASON_DUPLICATE_REQUEST | Field | |
REASON_UNSUPPORTED_RECIPE_DATA | Field | |
schema_version | Property | Schema version of this result (for persistence/telemetry consumers). |
success | Property | Accepted (true) or rejected (false). |
recipe_id | Property | Recipe the result refers to. |
request_id | Property | Request identity echoed from the caller (empty when none was supplied). |
operation_id | Property | Monotonic craft operation id assigned by the service for this attempt. |
requested_quantity | Property | Requested craft quantity (crafts of the recipe, not raw unit counts). |
reason | Property | Stable reason code. Empty on success. |
detail | Property | Stable reason payload (per-item shortages, unsupported ids, ...). |
consumed | Property | Exact consumed input facts on success. |
produced | Property | Exact produced output facts on success. |
inventory_outcome | Property | Nested Item Vault typed outcome when a mutation path produced one. |
inventory_fingerprint | Property | Inventory state fingerprint captured at completion. Use to detect stale state between a preflight and a commit in your own orchestration. |
accepted | Method | |
reason_code | Method | |
ok | Method | |
failed | Method | |
result | Property |