Skip to content

Commit

Permalink
- Updated tts branch with S7 support
Browse files Browse the repository at this point in the history
- Added pitfighters_gull unique
- Added support for barb and necro placeholder items in maxroll import
- Removed affixes from uniques in maxroll import because quality of maxroll data is too bad to use
  • Loading branch information
cjshrader committed Jan 26, 2025
1 parent d890d4a commit 7c002ce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/gui/importer/maxroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ def import_maxroll(url: str):
unique_model = UniqueModel()
unique_name = mapping_data["items"][resolved_item["id"]]["name"]
try:
unique_name = _unique_name_special_handling(unique_name)
unique_model.aspect = AspectUniqueFilterModel(name=unique_name)
unique_model.affix = [
AffixFilterModel(name=x.name)
for x in _find_item_affixes(mapping_data=mapping_data, item_affixes=resolved_item["explicits"])
]
# Maxroll's uniques are all over the place in quality when it comes to affixes and names.
# Removing support for this for now.
# unique_model.affix = [
# AffixFilterModel(name=x.name)
# for x in _find_item_affixes(mapping_data=mapping_data, item_affixes=resolved_item["explicits"])
# ]
unique_filters.append(unique_model)
except Exception:
LOGGER.exception(f"Unexpected error importing unique {unique_name}, please report a bug.")
Expand Down Expand Up @@ -195,6 +198,16 @@ def _attr_desc_special_handling(affix_id: str) -> str:
return ""


def _unique_name_special_handling(unique_name: str) -> str:
match unique_name:
case "[PH] Season 7 Necro Pants":
return "kessimes_legacy"
case "[PH] Season 7 Barb Chest":
return "mantle_of_mountains_fury"
case _:
return unique_name


def _find_item_type(mapping_data: dict, value: str) -> ItemType | None:
for d_key, d_value in mapping_data.items():
if d_key == value:
Expand Down
6 changes: 6 additions & 0 deletions src/tools/data/custom_uniques_enUS.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
0
]
},
"pitfighters_gull": {
"desc": "seconds and leaves behind a cloud of shadows. While within the cloud",
"num_idx": [
0
]
},
"rakanoths_wake": {
"desc": "when you cast a skill with a cooldown you explode dealing fire damage",
"num_idx": [
Expand Down

0 comments on commit 7c002ce

Please sign in to comment.