EquipmentInventoryUI ​
Inherits: MarginContainer
Clean equipment panel using the unified ItemSlotUI system
Properties ​
PackedScene | item_slot_scene |
Variables ​
Player | panel_player | |
EquipmentInventoryComponent | current_equipment_data | |
Array[ItemSlotUI] | equipment_slot_uis | [] |
Dictionary | slot_ui_lookup | {} |
PlayerController | player_controller |
Methods ​
void | initialize_ui( system_hub: GameHost.SystemHub ) |
void | set_inventory_data( equipment_data: EquipmentInventoryComponent ) |
ItemSlotUI | get_equipment_slot_ui( slot_definition: EquipmentSlotDefinition, instance_index: int = 0 ) |
Array[ItemSlotUI] | get_all_equipment_slot_uis() |
Array[ItemSlotUI] | get_equipment_slots_by_category( category: EquipmentSlotDefinition.SlotCategory ) |
void | refresh_all_equipment_slots() |
ItemSlotUI | find_slot_with_item( item_instance: ItemInstance ) |
Array[ItemInstance] | get_equipped_items() |
Array[ItemInstance] | get_equipped_items_by_category( category: EquipmentSlotDefinition.SlotCategory ) |
bool | is_slot_occupied( slot_definition: EquipmentSlotDefinition, instance_index: int = 0 ) |
bool | has_equipped_item_in_category( category: EquipmentSlotDefinition.SlotCategory ) |
int | get_total_slot_count() |
int | get_occupied_slot_count() |
Array[ItemSlotUI] | get_sorted_equipment_slots() |
Dictionary | get_equipment_summary() |
void | set_panel_player( player: Player ) |
void | set_preview_camera( camera: Camera3D ) |
Signals ​
socket_panel_requested( equipment_item: ItemInstance ) ​
========== SIGNALS ==========
item_tooltip_requested( item: ItemInstance, definition: ItemDefinition, context: String, additional_data: Dictionary ) ​
Asks the interface to show the tooltip of an item: the item, its definition, where it is and extra data.
hide_tooltip( force_hide: bool ) ​
Asks the interface to hide the tooltip (force hides it at once).
message_requested( message: String ) ​
Asks the interface to show a message.
warning_message_requested( message: String ) ​
Asks the interface to show a warning.
drag_from_equipment_requested( item: ItemInstance, slot_data: SlotInstance ) ​
========== DRAG SIGNALS ==========
Property descriptions ​
PackedScene item_slot_scene ​
The scene of one slot.
Variable descriptions ​
Player panel_player ​
The player whose equipment the panel shows.
EquipmentInventoryComponent current_equipment_data ​
The equipment the panel shows.
Array[ItemSlotUI] equipment_slot_uis = [] ​
UI slot tracking
Dictionary slot_ui_lookup = ​
slot_identifier -> ItemSlotUI
PlayerController player_controller ​
SystemRefs
Method descriptions ​
void initialize_ui( system_hub: GameHost.SystemHub ) ​
Sets the part up with the hub of the game systems: connects the signals it listens to and fills it.
void set_inventory_data( equipment_data: EquipmentInventoryComponent ) ​
Shows the equipment of a player (the slots are made or updated).
ItemSlotUI get_equipment_slot_ui( slot_definition: EquipmentSlotDefinition, instance_index: int = 0 ) ​
Get a specific equipment slot UI by definition and instance
Array[ItemSlotUI] get_all_equipment_slot_uis() ​
Get all equipment slot UIs
Array[ItemSlotUI] get_equipment_slots_by_category( category: EquipmentSlotDefinition.SlotCategory ) ​
Get equipment slot UIs by category
void refresh_all_equipment_slots() ​
Refresh all equipment slot displays
ItemSlotUI find_slot_with_item( item_instance: ItemInstance ) ​
Find equipment slot UI that contains specific item
Array[ItemInstance] get_equipped_items() ​
Get currently equipped items
Array[ItemInstance] get_equipped_items_by_category( category: EquipmentSlotDefinition.SlotCategory ) ​
Get equipped items by category
bool is_slot_occupied( slot_definition: EquipmentSlotDefinition, instance_index: int = 0 ) ​
Check if a specific slot is occupied
bool has_equipped_item_in_category( category: EquipmentSlotDefinition.SlotCategory ) ​
Check if any slot of a category is occupied
int get_total_slot_count() ​
Get total number of equipment slots
int get_occupied_slot_count() ​
Get number of occupied slots
Array[ItemSlotUI] get_sorted_equipment_slots() ​
Get equipment slots sorted by category and sort order
Dictionary get_equipment_summary() ​
Get equipment summary by category
void set_panel_player( player: Player ) ​
Set the panel player
void set_preview_camera( camera: Camera3D ) ​
Set the preview camera for character preview