CONTENT CONTRACT · VERSION 1
grant_item
Add a positive quantity to the inventory of a permitted actor; a full inventory or stack overflow rejects the whole transaction.
Signature
{ count: PositiveCount, holder: ActorRef, item: ItemId, kind: "grant_item" }Fields
| Name | Type | Meaning |
|---|---|---|
count | PositiveCount | Number of units; the enclosing operation defines its permitted owner. Range: 1…2147483647; Unit: count |
holder | ActorRef | Actor whose inventory changes: the event actor or the invocation owner. Length: 1…256; Pattern: ^[\s\S]+$ |
item | ItemId | Inventory item definition to count, consume or match. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
kind | "grant_item" | Discriminant |
Validated example
{
"count": 2,
"holder": "a1",
"item": "core:healing_potion",
"kind": "grant_item"
}