Skip to content

Commit

Permalink
Fix new res affix name in maxroll api (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisoro authored Aug 21, 2024
1 parent 47e03d3 commit 47d62b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/gui/importer/maxroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ def _find_item_affixes(mapping_data: dict, item_affixes: dict) -> list[Affix]:
if affix["id"] == 1014505:
attr_desc = "evade grants movement speed for second"
elif "formula" in affix["attributes"][0] and affix["attributes"][0]["formula"] in [
"Affix40%_SingleResist",
"AffixFlatResourceUpto4",
"AffixResourceOnKill",
"AffixSingleResist",
]:
if affix["attributes"][0]["formula"] in ["AffixSingleResist"]:
if affix["attributes"][0]["formula"] in ["Affix40%_SingleResist", "AffixSingleResist"]:
attr_desc = mapping_data["uiStrings"]["damageType"][str(affix["attributes"][0]["param"])] + " Resistance"
elif affix["attributes"][0]["formula"] in ["AffixFlatResourceUpto4"]:
attr_desc = mapping_data["uiStrings"]["resourceType"][str(affix["attributes"][0]["param"])] + " per Second"
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def on_worker_finished():
)
instructions_text.setReadOnly(True)
font_metrics = instructions_text.fontMetrics()
text_height = font_metrics.height() * (instructions_text.document().lineCount() + 1)
text_height = font_metrics.height() * (instructions_text.document().lineCount() + 2)
instructions_text.setFixedHeight(text_height)
layout.addWidget(instructions_text)

Expand Down Expand Up @@ -242,7 +242,7 @@ def on_worker_finished():
)
instructions_text.setReadOnly(True)
font_metrics = instructions_text.fontMetrics()
text_height = font_metrics.height() * (instructions_text.document().lineCount() + 1)
text_height = font_metrics.height() * (instructions_text.document().lineCount() + 2)
instructions_text.setFixedHeight(text_height)
layout.addWidget(instructions_text)

Expand Down

0 comments on commit 47d62b7

Please sign in to comment.