Difference between revisions of "Inventory"

From RunWiki
Jump to: navigation, search
(Created page with "The inventory tracks jigs and creations owned by the current owner. An Inventory is automatically created with a new <code>Run</code> instance and assigned to <code>Run.invent...")
 
 
Line 6: Line 6:
  
 
'''Warning:&nbsp;Never search for code in your inventory by its name. Anyone can create and send you code with any name.'''
 
'''Warning:&nbsp;Never search for code in your inventory by its name. Anyone can create and send you code with any name.'''
 +
 +
 +
[[Category:run-doc]]

Latest revision as of 20:20, 27 March 2023

The inventory tracks jigs and creations owned by the current owner. An Inventory is automatically created with a new Run instance and assigned to Run.inventory. It is reset whenever the owner changes.

The simplest way to load your jigs is to call run.inventory.sync() and then access run.inventory.jigs.

Alternatively, you can use the inventory to find your code. run.inventory.sync() will load all the code that you own and place it in the run.inventory.code array. You can filter that array by origin to find the code you plan to use.

Warning: Never search for code in your inventory by its name. Anyone can create and send you code with any name.