feat(ui): add separate Left/Right ring slots in loadout manager
- Split accessories section into Left Ring and Right Ring selectors - Added Clothing and Pet buttons - Updated AccessoriesSelectorDialog to accept slot_filter parameter - Filter rings by Left Finger/Right Finger slot when selecting - Store current_left_ring and current_right_ring in loadout - Display ring effects (multi-effect support) in the UI Ring effects like 'Decreased Critical Damage Taken 4%, Increased Dodge Chance 4%' are now properly displayed.
This commit is contained in:
parent
1db965f92a
commit
2183b79ce8
|
|
@ -38,30 +38,32 @@ class AccessoriesLoaderThread(QThread):
|
|||
|
||||
class AccessoriesSelectorDialog(QDialog):
|
||||
"""Dialog for selecting rings, clothing, and pets from Entropia Nexus API."""
|
||||
|
||||
|
||||
ring_selected = pyqtSignal(NexusRing)
|
||||
clothing_selected = pyqtSignal(NexusClothing)
|
||||
pet_selected = pyqtSignal(NexusPet)
|
||||
|
||||
def __init__(self, parent=None, initial_tab: str = "rings"):
|
||||
|
||||
def __init__(self, parent=None, initial_tab: str = "rings", slot_filter: str = None):
|
||||
super().__init__(parent)
|
||||
self.setWindowTitle("Select Accessories - Entropia Nexus")
|
||||
self.setMinimumSize(900, 600)
|
||||
|
||||
|
||||
self.all_rings: List[NexusRing] = []
|
||||
self.all_clothing: List[NexusClothing] = []
|
||||
self.all_pets: List[NexusPet] = []
|
||||
|
||||
|
||||
self.selected_ring: Optional[NexusRing] = None
|
||||
self.selected_clothing: Optional[NexusClothing] = None
|
||||
self.selected_pet: Optional[NexusPet] = None
|
||||
|
||||
|
||||
self.slot_filter = slot_filter # "Left Finger" or "Right Finger" or None
|
||||
|
||||
self._setup_ui()
|
||||
|
||||
|
||||
# Set initial tab
|
||||
tab_map = {"rings": 0, "clothing": 1, "pets": 2}
|
||||
self.tabs.setCurrentIndex(tab_map.get(initial_tab, 0))
|
||||
|
||||
|
||||
self._load_data()
|
||||
|
||||
def _setup_ui(self):
|
||||
|
|
@ -302,7 +304,12 @@ class AccessoriesSelectorDialog(QDialog):
|
|||
tree.addTopLevelItem(item)
|
||||
return
|
||||
|
||||
for ring in self.all_rings:
|
||||
# Filter rings by slot if specified
|
||||
rings_to_show = self.all_rings
|
||||
if self.slot_filter:
|
||||
rings_to_show = [r for r in rings_to_show if r.slot == self.slot_filter]
|
||||
|
||||
for ring in rings_to_show:
|
||||
item = QTreeWidgetItem()
|
||||
item.setText(0, ring.name)
|
||||
# Format effects as string
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue