EquipmentSlotInstance ​
Inherits: SlotInstance < RefCounted
Equipment slot for single-item equipment storage
Description ​
Equipment slots are specialized containers that:
- Hold exactly one piece of equipment (no stacking)
- Validate equipment type compatibility
- Provide equipment-specific metadata
- Handle slot identification and display
Pure data container - effect handling is done by EquipmentInventoryComponent
Variables ​
EquipmentSlotDefinition | slot_definition | |
int | slot_instance_index | 0 |
Methods ​
bool | supports_stacking() |
int | get_quantity() |
bool | can_accept_item( item: ItemInstance ) |
bool | equip_item( item: ItemInstance ) |
ItemInstance | get_equipped_item() |
ItemDefinitionEquipment | get_equipped_item_definition() |
String | get_display_name() |
Texture2D | get_slot_icon() |
bool | accepts_equipment_definition( equipment_def: ItemDefinitionEquipment ) |
bool | is_primary_slot() |
WeaponClassDefinition | get_equipped_weapon_type() |
bool | has_weapon_equipped() |
SetBonusDefinition | get_equipped_set_definition() |
bool | has_set_item_equipped() |
Variable descriptions ​
EquipmentSlotDefinition slot_definition ​
The definition that describes this slot's type and constraints
int slot_instance_index = 0 ​
Index of this slot instance when multiple slots of same type exist (rings, etc.)
Method descriptions ​
bool supports_stacking() ​
Equipment slots never stack - always single item
int get_quantity() ​
Equipment quantity is always 1 or 0
bool can_accept_item( item: ItemInstance ) ​
Check if this slot can accept a specific item instance
bool equip_item( item: ItemInstance ) ​
Equip an item instance to this slot
ItemInstance get_equipped_item() ​
Get the equipped item instance (with type safety)
ItemDefinitionEquipment get_equipped_item_definition() ​
Get the equipped item definition (with type safety)
String get_display_name() ​
Get human-readable display name for this slot
Texture2D get_slot_icon() ​
Get the slot definition's icon
bool accepts_equipment_definition( equipment_def: ItemDefinitionEquipment ) ​
Check if this slot accepts a specific equipment definition
bool is_primary_slot() ​
Check if this is a primary slot (index 0) for multi-instance slots
WeaponClassDefinition get_equipped_weapon_type() ​
Get the weapon type if equipped item is a weapon
bool has_weapon_equipped() ​
Check if equipped item is a weapon
SetBonusDefinition get_equipped_set_definition() ​
Get equipment set information if applicable
bool has_set_item_equipped() ​
Check if equipped item belongs to a set