PathOfBuilding icon indicating copy to clipboard operation
PathOfBuilding copied to clipboard

Add 'Implicits: 0' where missing for unique items

Open pHiney opened this issue 2 years ago • 0 comments

Fixes Data inconsistency.

Description of the problem being solved:

Only some items had an Implicits statement

Steps taken to verify a working solution:

  • in lua, validate that each item has an Implicits statement for f in *.lua;do echo $f;grep '[[' $f | wc -l;grep Implicits: $f | wc -l;done
  • when converted to xml, validate each item has an Implicits statement
        u = read_xml(Path(self.pob_config.exe_dir, "Data/uniques.xml"))
        for child in list(u.getroot()):
            for _item in child.findall("Item"):
                if "Implicits:" not in _item.text:
                    lines = [y for y in (x.strip() for x in _item.text.splitlines()) if y]
                    print(lines[0])
                print()
  • when converted to xml, validate each item had only one Implicits statement
        u = read_xml(Path(self.pob_config.exe_dir, "Data/uniques.xml"))
        for child in list(u.getroot()):
            for _item in child.findall("Item"):
                lines = [y for y in (x.strip() for x in _item.text.splitlines()) if y]
                count = 0
                for line in lines:
                    if "Implicits:" in line:
                        count += 1
                        print(count, lines[0])
                print()
  • Choose a dozen or so items at random that were changed and confirm the tooltip hasn't changed, when compared against the live version of PoB.

Link to a build that showcases this PR:

N/A

Before screenshot:

N/A

After screenshot:

image

pHiney avatar Sep 17 '22 14:09 pHiney