Bug fixes

* Fixed Cho's suspenders invalid image
* Fixed rebuild_wardrobe_icons referencing a global instead of a local
* Fixed get_equipped_wardrobe_item nulls
* Added debug info for debugging threaded icons
This commit is contained in:
LoafyLemon 2023-07-12 23:25:53 +01:00
parent 4c98cbe669
commit 6538e7ebea
4 changed files with 5 additions and 5 deletions

View File

@ -38,6 +38,9 @@ init python:
self._hash = self.generate_hash()
self._button = DefaultQueue()
if config.developer:
self._loading = Fixed(Text(self.id, size=8), self._loading, xysize=(96, 96))
# Add to character wardrobe and unordered list
if not parent:
self.char.wardrobe.setdefault(self.categories[0], {}).setdefault(self.categories[1], []).append(self)

View File

@ -267,7 +267,7 @@ init python:
def get_equipped_wardrobe_item(self, items, subcat):
"""Returns first equipped item from a list or None."""
for i in items.get(subcat):
for i in items.get(subcat, []):
if self.is_equipped_item(i):
return i
return None

View File

@ -35,7 +35,7 @@ init python:
_lock = False
def rebuild_wardrobe_icons(items, subcat):
for i in category_items.get(subcat, []):
for i in items.get(subcat, []):
i.build_button(subcat)
def lock_wardrobe_icon(icon):