ESCInventory
Extends: Control
Description
Manages the inventory on the GUI connected to the inventory_ui_container variable.
Members
inventory_ui_container
var inventory_ui_container: NodePath
The actual container node to add items as children of. Should be a Container.
items_ids_in_inventory
var items_ids_in_inventory: Dictionary
A registry of inventory ESCInventoryItem nodes.
Methods
add_new_item_by_id
func add_new_item_by_id(item_id: String) -> void
Add item to Inventory UI using its id set in its scene.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item_id |
|
The id of the item to add |
yes |
Returns
Returns nothing.
remove_item_by_id
func remove_item_by_id(item_id: String) -> void
Remove item from Inventory UI using its id set in its scene.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item_id |
|
The id of the item to remove |
yes |
Returns
Returns nothing.
clear
func clear() -> void
Clear the inventory UI of all its items.
Parameters
None.
Returns
Returns nothing.