NodeInventories
Inherits: Node
Inherited By: CraftStation, Hotbar, Inventory
Base node for nodes that use the inventory database.
Description
This node contains the property that sets the inventory database to be used and contains methods that assist with the resources of this inventory database.
Properties
Methods
|
get_id_from_item(item: ItemDefinition) const |
get_item_from_id(id: |
Property Descriptions
InventoryDatabase database 🔗
void set_database(value: InventoryDatabase)
InventoryDatabase get_database()
The database that this node will use as a base. Two inventories with different databases cannot interact, for example the use of Inventory.transfer() will not happen.
Method Descriptions
String
get_id_from_item(item: ItemDefinition) const 🔗
Returns the id of an item.
ItemDefinition get_item_from_id(id: String
) const 🔗
Returns the ItemDefinition with a parameter of id
. This method uses an optimized cache fetch to avoid repeated processes.