InventoryDatabase

Inherits: Resource

Database of items, recipe, categories and craftstations.

Properties

Array[ItemCategory]

item_categories

[]

Array[ItemDefinition]

items

[]

Array[Recipe]

recipes

[]

Array[CraftStationType]

stations_type

[]

Methods

void

add_craft_station_type()

void

add_item()

void

add_item_category()

void

add_new_category(category: ItemCategory)

void

add_new_item(item: ItemDefinition)

void

add_recipe()

void

clear_current_data()

Dictionary

create_dynamic_properties(item_id: String)

void

deserialize_item_category(category: ItemCategory, data: Dictionary) const

void

deserialize_item_definition(definition: ItemDefinition, data: Dictionary) const

void

deserialize_recipe(recipe: Recipe, data: Dictionary) const

void

deserialize_station_type(station_type: CraftStationType, data: Dictionary) const

Error

export_json_file(path: String)

String

export_to_invdata() const

ItemCategory

get_category(code: int)

ItemCategory

get_category_from_id(id: String) const

ItemDefinition

get_item(id: String) const

String

get_new_valid_id() const

String

get_valid_id() const

bool

has_craft_station_type_id(id: String) const

bool

has_item_category_id(id: String) const

bool

has_item_id(id: String) const

void

import_from_invdata(json: String)

Error

import_json_file(path: String)

void

remove_category(category: ItemCategory)

void

remove_item(item: ItemDefinition)

Dictionary

serialize_item_category(category: ItemCategory) const

Dictionary

serialize_item_definition(definition: ItemDefinition) const

Dictionary

serialize_recipe(recipe: Recipe) const

Dictionary

serialize_station_type(station_type: CraftStationType) const


Property Descriptions

Array[ItemCategory] item_categories = [] 🔗

ItemCategory list in database. Use add_category() for add and remove_category() for remove.


Array[ItemDefinition] items = [] 🔗

ItemDefinition list in database. Use add_new_item() for add and remove_item() for remove.


Array[Recipe] recipes = [] 🔗

  • void set_recipes(value: Array[Recipe])

  • Array[Recipe] get_recipes()

Recipe list in database.


Array[CraftStationType] 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!