Skip to content

Commit

Permalink
Merge pull request OmegaK2#129 from lvlvllvlvllvlvl/pr/tattoo-stats
Browse files Browse the repository at this point in the history
Match in-game tattoo descriptions
  • Loading branch information
lvlvllvlvllvlvl authored Sep 17, 2023
2 parents eca3b6e + e745670 commit cece232
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions PyPoE/cli/exporter/wiki/parsers/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2627,20 +2627,16 @@ def format(*vals):
full_result=True,
lang=self._language,
)
infobox["tattoo_stat_text"] = "\n".join(tr.lines)
lines = [" ".join(line.splitlines()) for line in tr.lines]
infobox["tattoo_stat_text"] = "\n".join(lines)
if override["Effect"]:
skill = override["Effect"]["GrantedEffect"]
infobox["tattoo_skill_id"] = skill["Id"]
skill_name = skill["ActiveSkill"]["DisplayedName"]
link = f"[[Skill:{skill['Id']}|{skill_name}]]"
lines = [line.replace(skill_name, link) for line in lines]
stat_text = "<br>".join(parser.make_inter_wiki_links(line) for line in lines)
if data["PassiveSkillOverrideTypesKey"]:
# grants a random keystone
infobox["description"] = stat_text
else:
infobox["description"] = f'Grants "{stat_text}"'
infobox["description"] = stat_text
except KeyError:
return False
return True
Expand Down

0 comments on commit cece232

Please sign in to comment.