fix: correct _on_armor_changed to handle NexusArmorSet type
- NexusArmorSet.pieces is List[str], not Dict - Removed code that tried to call .items() on the list - Now simply clears current_armor_set when pieces are modified
This commit is contained in:
parent
fa427188d9
commit
343142162f
|
|
@ -2044,18 +2044,9 @@ class LoadoutManagerDialog(QDialog):
|
|||
def _on_armor_changed(self):
|
||||
"""Handle armor piece or plate change."""
|
||||
# If individual pieces are changed, we're no longer using a pure full set
|
||||
# Note: current_armor_set is a NexusArmorSet which has pieces as List[str]
|
||||
# We can't easily check if pieces match, so just clear the set reference
|
||||
if self.current_armor_set:
|
||||
# Check if all pieces match the set
|
||||
all_match = True
|
||||
for slot, piece in self.current_armor_set.pieces.items():
|
||||
widget = self.slot_widgets.get(slot)
|
||||
if widget:
|
||||
current = widget.get_piece()
|
||||
if not current or current.item_id != piece.item_id:
|
||||
all_match = False
|
||||
break
|
||||
|
||||
if not all_match:
|
||||
self.current_armor_set = None
|
||||
|
||||
self._update_armor_summary()
|
||||
|
|
|
|||
Loading…
Reference in New Issue