ESCInventoryManager
Extends: Resource
Description
A manager for inventory objects.
Methods
inventory_has
func inventory_has(item: String) -> bool
Checks whether the player has an inventory item.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
The inventory item’s id. |
yes |
Returns
Returns a bool value. (bool)
items_in_inventory
func items_in_inventory() -> Array
Retrieves all inventory items.
Parameters
None.
Returns
Returns a Array value. (Array)
remove_item
func remove_item(item: String) -> void
Removes an item from the player’s inventory.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
The inventory item’s id. |
yes |
Returns
Returns nothing.
add_item
func add_item(item: String) -> void
Adds an item to the player’s inventory.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
item |
|
The inventory item’s id. |
yes |
Returns
Returns nothing.
save_game
func save_game(p_savegame: ESCSaveGame) -> void
Saves the inventory in the specified savegame.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
p_savegame |
|
ESCSaveGame resource that holds all save data. |
yes |
Returns
Returns nothing.