ItemCategory

Inherits: Resource

Category to specify an ItemDefinition.

Description

This resource is used to add the same properties to multiple ItemDefinition at the same time. This category is also used by InventoryConstraint to specify a stack that can only accept a certain type of category.

Properties

Color

color

Color(0, 0, 0, 1)

Texture2D

icon

String

id

""

Array[String]

item_dynamic_properties

[]

Dictionary

item_properties

{}

String

name

""

Methods

int

get_code() const


Property Descriptions

Color color = Color(0, 0, 0, 1) 🔗

  • void set_color(value: Color)

  • Color get_color()

Color to identify the category. Used for example in a UI to paint a categorized slot in UI.


Texture2D icon 🔗

  • void set_icon(value: Texture2D)

  • Texture2D get_icon()

Category icon. Used for example for a background of a categorized slot in UI.


String id = "" 🔗

  • void set_id(value: String)

  • String get_id()

There is currently no description for this property. Please help us by contributing one!


Array[String] item_dynamic_properties = [] 🔗

  • void set_item_dynamic_properties(value: Array[String])

  • Array[String] get_item_dynamic_properties()

Defines dynamic properties for items that contain this category. Added automatically when ItemDefinition.categories is set.


Dictionary item_properties = {} 🔗

  • void set_item_properties(value: Dictionary)

  • Dictionary get_item_properties()

Defines properties for items that contain this category. Added automatically when ItemDefinition.categories is set.


String name = "" 🔗

  • void set_name(value: String)

  • String get_name()

Name of category.


Method Descriptions

int get_code() const 🔗

Code used to get fast category on InventoryDatabase.get_category.