This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
add_item_to_container [2020/02/19 11:29] – justin | add_item_to_container [2020/09/20 12:25] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Adds one or more of the specified [[item]] to an [[item_container|item container]]. The ID of the [[item]] is case-sensitive and should match the ID assigned to it in the [[item_editor|Item Editor]] (e.g. " | + | Adds one or more of the specified [[item|item]] to an [[item_container|item container]]. The ID of the [[item|item]] is case-sensitive and should match the ID assigned to it in the [[item_editor|Item Editor]] (e.g. " |
====Signature: | ====Signature: | ||
Line 10: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |entity|Container [[entity]] to which the [[item]] will be added.|[[Entity]]|Yes| | + | |entity|Container [[entity|entity]] to which the [[item|item]] will be added.|[[entity|Entity]]|Yes| |
- | |item_id|ID of the [[item]] (as assigned in the [[Item Editor]]).|[[String]]|Yes| | + | |item_id|ID of the [[item|item]] (as assigned in the [[item_editor|Item Editor]]).|[[string|String]]|Yes| |
- | |count|How many of the [[item]] to add (defaults to 1).|[[Number]]|No| | + | |count|How many of the [[item|item]] to add (defaults to 1).|[[number|Number]]|No| |
====Example: | ====Example: | ||
Line 18: | Line 18: | ||
add_item_to_container(self, | add_item_to_container(self, | ||
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Add Item Container** function to place a new [[item]] into a chest or onto a table after the player has performed an action to build, generate, or " | + | Use the **Add Item Container** function to place a new [[item|item]] into a chest or onto a table after the player has performed an action to build, generate, or " |
</ | </ | ||
Line 29: | Line 29: | ||
<WRAP half column> | <WRAP half column> | ||
====Editor Node:==== | ====Editor Node:==== | ||
- | {{:wiki: | + | {{: |
</ | </ | ||
<WRAP half column> | <WRAP half column> | ||
====Visual Demo:==== | ====Visual Demo:==== | ||
- | {{:wiki: | + | {{: |
</ | </ | ||
</ | </ |