PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding
Refactor `pathDist` variable to always be numerical
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 5.4k
- Forks
- 2.4k
- Ø Merge
- 1 T. 12 Std.
- Gemergte PRs (30 T.)
- 26
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die pathDist-Diskussion in Pull Request #2250 zu lesen und jede Verwendung des pathDist-Attributs zu finden. Das Refactoring ist abgeschlossen, wenn pathDist immer numerisch ist und die Darstellung nicht mehr davon abhängt, auf Zeichenfolgenwerte wie "Anoint" oder "Cluster" zu prüfen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- game-dev
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100