Skip to content

Toggle fuzzy for all#351

Open
Dragonkiller93 wants to merge 4 commits intodillydill123:masterfrom
Dragonkiller93:all-fuzzy
Open

Toggle fuzzy for all#351
Dragonkiller93 wants to merge 4 commits intodillydill123:masterfrom
Dragonkiller93:all-fuzzy

Conversation

@Dragonkiller93
Copy link
Copy Markdown

Adds an option to fuzzy all, which will make all items of the same type fuzzy/nonfuzzy, but only in the one setup. Ironically, the toggle all fuzzy is not fuzzy, so it will only work for items which are exactly the same.

java_PF8CjN3krD

Wording probably needs to be changed, not sure how the menu option should be setup.

Maybe a separate category of multiple item changers would be helpful. Similar to how shift changes all items across all setups, but only for the current setup. Could use ctrl instead of shift, and add this fuzzy toggle and a change all items option.

Fixes #267

Copy link
Copy Markdown
Owner

@dillydill123 dillydill123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is fine, but I don't see the need for a separate right click menu. Why not add this logic to the callback of the Toggle Fuzzy menu?

ItemManager problems
@Dragonkiller93 Dragonkiller93 changed the title Toggle fuzzy for all (Incomplete) Toggle fuzzy for all Jul 19, 2025
@Dragonkiller93
Copy link
Copy Markdown
Author

Lots of changes, thank you for all the help, and sorry so much was needed, still new to plugins. Should work across the board, but I did change a bit of logic that might need looking at.

@Dragonkiller93 Dragonkiller93 changed the title (Incomplete) Toggle fuzzy for all Toggle fuzzy for all Jul 28, 2025
@dillydill123
Copy link
Copy Markdown
Owner

Looking better, more comments.

Copy link
Copy Markdown
Owner

@dillydill123 dillydill123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking better! More comments

inventorySetup.getEquipment().forEach(toggleFuzzyIfMatched);
inventorySetup.getAdditionalFilteredItems().values().forEach(toggleFuzzyIfMatched);

if (inventorySetup.getQuiver() != null)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to also consider the bolt pouch and rune pouch. The InventorySetup needs a nicer/extendable interface for "Containers" but that's a different problem

int processedId = itemManager.canonicalize(originalItem.getId());
int baseProcessedId = InventorySetupsVariationMapping.map(processedId);
Collection<Integer> variations = InventorySetupsVariationMapping.getVariations(baseProcessedId);
variations.add(processedId);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to add the processedId here? Shouldn't variations contain it already?

plugin.toggleAllFuzzyOnSlot(slot);
});
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bring back this newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] (Un)fuzzy all identical items in setup

2 participants