Weapon type filter - #2
Open
shimotron wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a "Weapon types considered" section to the General page, mirroring
the existing armor-type filter. Unchecked weapon subtypes stop generating
upgrade arrows, tooltip verdicts, loot alerts, and quest-reward marks.
Useful for hiding weapon kinds you can equip but don't want to gear (e.g.
a caster hiding staff/2H arrows).
Built by mirroring the armor-filter pattern across the same touch points
(storage in 01_profiles, a "wrongweapon" gate in 04_score next to
"wrongarmor", accessors in 09_lootalert, checkboxes in RefactorGearUI,
label in 05_tooltip).
Two bugs found and fixed while building it:
not singular, so a hardcoded list never matched. Now queries the
client's own subclass list.
is Armor). Now locates the class by name via GetAuctionItemClasses,
with a weapon-word safety net so a wrong index can't leak armor names
onto the page.
Filtering is per character and hide-only. Verified by syntax check and
offline simulation of the addon's own code against the Ascension live
client's subtype/class strings, not in-client, so worth a spot-check
before merging. Credit to a couple of us on the CoA Discord who surfaced
the plural-string bug testing bows and polearms.
Heads-up: the diff looks huge (thousands of lines) due to a line-ending
change on upload, not real edits. The actual change is ~small; the
line-ending noise can be normalized if you'd prefer.