Update stat filters#1060
Conversation
Filters now also look for fractured, crafted and enchanted mods. Added new strings and some new filters
|
Talisman filter doesn't return the Talismans in my stash, also the Craftables filter returns very few results, may be fixed also. Edit: Talisman filter doesn't work because they get the Amulet base type here but changing the order there removes them from amulets and adds to Talismans. https://github.com/Stickymaddness/Procurement/blob/master/POEApi.Model/GearType/GearTypeFactory.cs |
|
To add new strings, converted IncreasedPhysicalDamageFilter and ManaRegenFilter to use OrStatFilter Can I add implicit mods to ExplicitModBase or was the goal there excluding implicit mods? |
cards: Mitts, Her Mask, The Sword King's Salute
| get | ||
| { | ||
| return "Full Bestiary Orb"; | ||
| return "Captured Beasts"; |
There was a problem hiding this comment.
"Captured" beasts include those not just stored in orbs. I used the name "Full Bestiary Orb" because that's essentially what GGG calls them -- see the file name used for the icon: BestiaryOrbFull.png.
There was a problem hiding this comment.
I used captured beasts because it's the same term used on trade, the other sounds more like an internal name
| public AmuletFilter() | ||
| : base(GearType.Amulet, "Amulets") | ||
| { } | ||
| public override bool Applicable(Item item) |
There was a problem hiding this comment.
Add a blank line before this one.
| get { return FilterGroup.Default; } | ||
| } | ||
| public ManaRegenFilter() | ||
| : base("Mana regen", "Items with increased Mana Regeneration Rate", "increased Mana Regeneration Rate", "Mana per second", "Mana Regenerated per second", "as extra Mana Regeneration") |
There was a problem hiding this comment.
Split across multiple lines.
| if (mod.Contains(keyword)) | ||
| return true; | ||
|
|
||
| if (gear.EnchantMods != null) |
There was a problem hiding this comment.
Technically, enchant mods are not explicit mods (and you can argue crafted and fractured mods aren't either). However, I think the intent of this class (as it is being used) is to search the mods of an item. As such, I could see also adding implicit mods to this class, if we rename the class.
Ideally, which mods are search should be a parameter to the value/property being searched for and can be customized by the user. But that is a much larger change that is outside the scope of this PR.
There was a problem hiding this comment.
If there is interest, it will be easy to support customized searches on search box with my other PR, like name: type: mod: explicit: implicit: crafted: fractured: enchanted: flavour: property: requirement: description: prophecy: card:
There was a problem hiding this comment.
It seems to be added with only explicit mods in mind, so if we're going to add implicit mods, I think it's better to remove the file and use StatFilter instead
Filters now also support fractured, crafted and enchanted mods. Added new strings and some new filters.