InventoryDatabase
Inherits: Resource
Database of items, recipe, categories and craftstations.
Properties
Array[ItemCategory] |
|
|
Array[ItemDefinition] |
|
|
Array[Recipe] |
|
|
Array[CraftStationType] |
|
Methods
void |
|
void |
add_item() |
void |
|
void |
add_new_category(category: ItemCategory) |
void |
add_new_item(item: ItemDefinition) |
void |
|
void |
|
|
create_dynamic_properties(item_id: |
void |
deserialize_item_category(category: ItemCategory, data: |
void |
deserialize_item_definition(definition: ItemDefinition, data: |
void |
deserialize_recipe(recipe: Recipe, data: |
void |
deserialize_station_type(station_type: CraftStationType, data: |
Error |
export_json_file(path: |
|
export_to_invdata() const |
get_category(code: |
|
get_category_from_id(id: |
|
get_item(id: |
|
|
get_new_valid_id() const |
|
get_valid_id() const |
|
has_craft_station_type_id(id: |
|
has_item_category_id(id: |
|
has_item_id(id: |
void |
import_from_invdata(json: |
Error |
import_json_file(path: |
void |
remove_category(category: ItemCategory) |
void |
remove_item(item: ItemDefinition) |
|
serialize_item_category(category: ItemCategory) const |
|
serialize_item_definition(definition: ItemDefinition) const |
|
serialize_recipe(recipe: Recipe) const |
|
serialize_station_type(station_type: CraftStationType) const |
Property Descriptions
Array[ItemCategory] item_categories = []
🔗
void set_item_categories(value: Array[ItemCategory])
Array[ItemCategory] get_item_categories()
ItemCategory list in database. Use add_category() for add and remove_category() for remove.
Array[ItemDefinition] items = []
🔗
void set_items(value: Array[ItemDefinition])
Array[ItemDefinition] get_items()
ItemDefinition list in database. Use add_new_item() for add and remove_item() for remove.
Recipe list in database.
Array[CraftStationType] stations_type = []
🔗
void set_stations_type(value: Array[CraftStationType])
Array[CraftStationType] get_stations_type()
CraftStationType list in database.
Method Descriptions
void add_craft_station_type() 🔗
There is currently no description for this method. Please help us by contributing one!
void add_item() 🔗
There is currently no description for this method. Please help us by contributing one!
void add_item_category() 🔗
There is currently no description for this method. Please help us by contributing one!
void add_new_category(category: ItemCategory) 🔗
Add new ItemCategory to database. This method update category code cache for fast check categories in running game.
void add_new_item(item: ItemDefinition) 🔗
Add new ItemDefinition to database. This method update item definition code cache for fast check items id in running game.
void add_recipe() 🔗
There is currently no description for this method. Please help us by contributing one!
void clear_current_data() 🔗
There is currently no description for this method. Please help us by contributing one!
Dictionary
create_dynamic_properties(item_id: String
) 🔗
There is currently no description for this method. Please help us by contributing one!
void deserialize_item_category(category: ItemCategory, data: Dictionary
) const 🔗
There is currently no description for this method. Please help us by contributing one!
void deserialize_item_definition(definition: ItemDefinition, data: Dictionary
) const 🔗
There is currently no description for this method. Please help us by contributing one!
void deserialize_recipe(recipe: Recipe, data: Dictionary
) const 🔗
There is currently no description for this method. Please help us by contributing one!
void deserialize_station_type(station_type: CraftStationType, data: Dictionary
) const 🔗
There is currently no description for this method. Please help us by contributing one!
Error export_json_file(path: String
) 🔗
There is currently no description for this method. Please help us by contributing one!
String
export_to_invdata() const 🔗
There is currently no description for this method. Please help us by contributing one!
ItemCategory get_category(code: int
) 🔗
Return ItemCategory of code. This code is used as a bitflag to easily access the item in your category list when running the game.
ItemCategory get_category_from_id(id: String
) const 🔗
There is currently no description for this method. Please help us by contributing one!
ItemDefinition get_item(id: String
) const 🔗
Returns an ItemDefinition based on the param id
. This ID is searched for in the cache list managed by this database, this list is updated when we run the game.
String
get_new_valid_id() const 🔗
Returns a new valid identifier for the ItemDefinition. This method does not return ids that already exist.
String
get_valid_id() const 🔗
Returns an existing id of items.
bool
has_craft_station_type_id(id: String
) const 🔗
There is currently no description for this method. Please help us by contributing one!
bool
has_item_category_id(id: String
) const 🔗
There is currently no description for this method. Please help us by contributing one!
bool
has_item_id(id: String
) const 🔗
Returns true if there is an ItemDefinition with the id
.
void import_from_invdata(json: String
) 🔗
There is currently no description for this method. Please help us by contributing one!
Error import_json_file(path: String
) 🔗
There is currently no description for this method. Please help us by contributing one!
void remove_category(category: ItemCategory) 🔗
Remove ItemCategory from database. This method updates the category bitflag cache.
void remove_item(item: ItemDefinition) 🔗
Remove ItemDefinition from database. This method update item definition code cache for fast check items id in running game.
Dictionary
serialize_item_category(category: ItemCategory) const 🔗
There is currently no description for this method. Please help us by contributing one!
Dictionary
serialize_item_definition(definition: ItemDefinition) const 🔗
There is currently no description for this method. Please help us by contributing one!
Dictionary
serialize_recipe(recipe: Recipe) const 🔗
There is currently no description for this method. Please help us by contributing one!
Dictionary
serialize_station_type(station_type: CraftStationType) const 🔗
There is currently no description for this method. Please help us by contributing one!