inventory.gd
Extends: Control
Description
EgoVenture Inventory system
Property Descriptions
selected_item
var selected_item: InventoryItemNode
The currently selected inventory item or null
activated
var activated: bool = false
Wether the inventory is currently activated
just_released
var just_released: bool = false
Wether the inventory item was just released (to prevent other actions to be carried out)
ignore_pause
var ignore_pause: bool = false
Wether to ignore a game pause
Method Descriptions
configure
func configure(configuration: GameConfiguration)
Configure the inventory. Should be call by a game core singleton
** Parameters **
configuration: The game configuration
disable
func disable()
Disable the inventory system
enable
func enable()
Enable the inventory system
add_item
func add_item(item: InventoryItem, skip_show: bool = false, allow_duplicate: bool = false, position: int)
remove_item
func remove_item(item: InventoryItem)
Remove item from the inventory
** Parameters **
item: Item to remove from the inventory
release_item
func release_item()
Release the currently selected item
get_items
func get_items() -> Array
Returns the current list of inventory items
has_item
func has_item(needle: InventoryItem) -> bool
Check, wether the player carries a specific item
** Parameters **
needle: item searched for
returns: true if the player is carrying the item, false if not.
toggle_inventory
func toggle_inventory()
Show or hide the inventory
Signals
signal triggered_inventory_item(first_item, second_item): Emitted, when another inventory item was triggered
signal released_inventory_item(item): Emitted when the player released an item