Changes

Jump to navigation Jump to search
→‎Format: update for 1.6.0 build 24075 (added ActionsOnPurchase)
Line 84: Line 84:  
| <samp>PerItemCondition</samp>
 
| <samp>PerItemCondition</samp>
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether an item produced from the other fields should be added (e.g. to filter results from item queries like <samp>ALL_ITEMS</samp>). Defaults to always added.
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether an item produced from the other fields should be added (e.g. to filter results from item queries like <samp>ALL_ITEMS</samp>). Defaults to always added.
 +
|-
 +
| <samp>ActionsOnPurchase</samp>
 +
| ''(Optional)'' A list of [[Modding:Trigger actions|actions]] to run when the player purchases this item. These are run once per purchase click. Default none.
 +
 +
For example, this can be used to start a [[Modding:Dialogue#Conversation topics|conversation topic]] when it's purchased:
 +
<syntaxhighlight lang="js">
 +
"ActionsOnPurchase": [
 +
    "AddConversationTopic {{ModId}}_PurchasedItem 5"
 +
]
 +
</syntaxhighlight>
 
|}
 
|}
 
|-
 
|-
translators
8,438

edits

Navigation menu