Skip to content

provide item ID sets instead of enum values#101

Open
euclio wants to merge 1 commit intomcgeer:masterfrom
euclio:item-set-refactor
Open

provide item ID sets instead of enum values#101
euclio wants to merge 1 commit intomcgeer:masterfrom
euclio:item-set-refactor

Conversation

@euclio
Copy link
Copy Markdown
Contributor

@euclio euclio commented Jan 19, 2025

This PR simplifies the way that item storage is specified.

Instead of requiring each storage location to be an enum of items it supports, all locations now supply the set of items that they support. This has a few benefits:

  • Removes the need to "stutter" the enum identifier with the item ID, adding a new item to storage is now just adding a new constant to the set.
  • Internally, items can now store their item lists however they want. This could enable generating the lists from Wiki data instead of needing to write them by hand. It also would allow storage locations to organize their storage in different ways (for example, the treasure chest could store items by clue tier).
  • IntelliJ will warn if an item is added to a set twice
  • Pulls the "is BIS" check out into a separate set, so that storage locations only need to know what they store. Storage locations where "BIS" is irrelevant (seed vault) don't need to supply it.
  • Makes checking the existence of an item in a location a simple hash lookup. This will enable more efficient checking of filtered items, but I didn't do it in this PR to keep is as small as possible.

I upgraded the Plugin to JDK 11 to get access to the Set.of API.

@mcgeer
Copy link
Copy Markdown
Owner

mcgeer commented Sep 20, 2025

Sorry I never got to this, I know its ages old. But will investigate shortly.

@euclio
Copy link
Copy Markdown
Contributor Author

euclio commented Jan 6, 2026

Happy to rebase this if it's something you're interested in.

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.

2 participants