PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding
Refactor `pathDist` variable to always be numerical
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 5.4k
- Forks
- 2.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 26
Description
The pathDist attribute is a bit of a mess. It can either assume the normal distance if there is a path, or some magic values (100, 1000, "Anoint", "Cluster"), depending on the circumstances. I'd recommend refactoring "Anoint" and "Cluster" to yet another two magic numbers to avoid having to check for the type of the attribute and to decouple computation with and presentation of these magic numbers, as well as documenting them. However, that's out of scope for this PR.
Originally posted by @ppoelzl in https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/2250#r606424703
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the pathDist discussion in pull request #2250 and locate every use of the pathDist attribute. The refactor is complete when pathDist is always numerical and presentation no longer depends on checking for string values such as "Anoint" or "Cluster".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100