GUI Filter Editor + Dynamic Ignore#2
Open
ansidian wants to merge 5 commits into
Open
Conversation
Lock an inventory item (configurable hotkey, default middle-click) to skip it when stashing and mark it with a lock icon in any cell it occupies. - DynamicIgnore: hotkey toggle, per-cell icon draw, stash-skip - ItemFingerprint: stable per-item identity for locks - locks are persisted across restarts and self-pruned against the live inventory at stash time so stale entries don't accumulate - bundles images/lock.png and copies it to the output directory; falls back to a primitive marker if the texture is missing
Replaces hand-editing filter JSON with a visual editor that round-trips losslessly to and from the raw query. - condition model + attribute catalog + query compiler/parser for a non-destructive raw<->tree round-trip (raw fallback preserves anything the builder can't model) - recursive AND/OR tree editor with per-node menus and arbitrary nesting, built on a pure ConditionTreeOps (wrap/convert/move/ungroup/delete) - item scanner: grab hovered items (inventory/stash/ground) into a discovery pool and turn their mods into conditions - debounced auto-save with live reload, per-column scrolling, defensive item reads - stash-tab assignment keyed by stable filter Id, migrated from the name-keyed store - scoped StashieTheme + Controls helpers
Auto-save (and the manual "Save Filter to File") only reloaded the stashing engine's rules via LoadCustomFilters, not the stash-tab assignment menu (GenerateTabMenu). New or renamed filters therefore did not appear in the tab list until the manual "Reload config" button was clicked. Extract the button's two steps into StashieSettingsHandler.ReloadConfig (LoadCustomFilters + GenerateTabMenu, guarded against a missing filter file) and route the manual button, SaveCurrentFilter, and AutoSaveTick through it, so auto-saved edits apply live without a manual reload.
Grabbed items now show a "stats" section in the filter-builder card with one-click ">= current value" conditions: - Scalars: Item Level and Quality (all items), Map Tier (waystones). - Map reward block: Item Rarity, Item Quantity, Pack Size, Monster Rarity, Waystone Drop Chance, read from ItemData.ItemStats with clean tooltip labels. IFL's query language is Dynamic LINQ, so stat conditions compile to the indexer form `ItemStats[GameStat.X] >= N` -- GetValueOrDefault is an unregistered extension and does not resolve. ItemStats is a DefaultDictionary, so the bare indexer is eval-safe on items lacking the key. Only the "...FinalFromMap" reward stats are emitted; every other ItemStats entry is a per-mod stat already shown in the mod list. Also fixes the MapTier attribute DSL (now MapInfo.Tier), which previously failed to compile and was silently pruned.
…dd Unidentified flag Grabbed items held a live ItemData and re-read it every frame, so picking an item up right after grabbing reused its memory slot and turned mod values into garbage. Snapshot the chips into plain values, refresh only while the source entity's identity holds, and merge monotonically so a teardown read can never downgrade a good value. Read mods directly from the live Mods component and isolate each mod read: a single mod whose .Translation throws no longer aborts the enumeration and drops every other mod on the item. Add an "Unidentified" metadata flag (IsIdentified + notHas) for unidentified Magic/Rare/Unique items, alongside the existing "Identified".
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.
Add a GUI editor for building stash filters, replacing the existing.
to pull its attributes into a discovery pool, then build conditions off it
stay in sync
No changes to existing Stashie behavior
Also included in the PR: Dynamic Ignore
This was made before the GUI editor so this PR includes the following feature as well.
commit
e43c71f, "dynamic item ignore with lock icon"The editor's item scanner reuses one helper from it (
DynamicIgnore.GetHoveredInventoryItem()), so excluding this will require some change:GetHoveredInventoryItem()andGetInventorySlotItems()out ofCompartments/DynamicIgnore.csintoCompartments/ItemScanner.cs— they'reself-contained (just find the inventory item under the cursor, no lock logic) —
and update the call around
ItemScanner.cs:47.Compartments/DynamicIgnore.cs,Classes/ItemFingerprint.cs,images/lock.png.Compartments/FilterManager.cs: remove theDynamicIgnore.PruneToInventory(...)and
DynamicIgnore.IsLocked(...)lines.Stashie.cs: remove the DynamicIgnore hotkey register + OnValueChanged, thelock.pngInitImage block, the icon-corner ListNode setup, andDynamicIgnore.HandleHotkey()inTick().StashieSettings.cs: remove theDynamicIgnore*settings andLockedItemFingerprints.Stashie.csproj: remove theimages\lock.pngItemGroup.