Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory Manager refactoring and new features #687

Open
6 tasks
SirEndii opened this issue Jan 15, 2025 · 3 comments
Open
6 tasks

Inventory Manager refactoring and new features #687

SirEndii opened this issue Jan 15, 2025 · 3 comments
Labels
enhancement New feature or request Priority-Medium refactoring Breaking changes - Refactor to a better standard
Milestone

Comments

@SirEndii
Copy link
Member

The inventory manager was an early feature and didn't really follow any rules
After some time, I changed the syntax of the functions so they use our new ItemFilter
What I want to check/refactor:

  • Slot numbers - Do they make sense how we access the armor and offhand slot, do we want to follow another/more popular standard there
  • Function names - Some of the functions could need some better names
  • Something else? - Just testing the inv manager before I mark this issue as done

One feature which I saw was requested often is, that the inventory manager should be able to provide a CC Generic inventory object so it can just be used as any cc inventory like a chest

Features I want to add:

  • CC Inventory Object - Add a function to return a CC Generic Inventory Object
  • Add items with capabilities - When for example a hopper tries to push items into the inventory manager, directly add the item to the user
  • Permissions and Multiple Cards - This is optional and could maybe be too much work for now - So support that multiple players could be added to one inventory manager. But this would need an even more refactoring for something that is maybe not really used that much
@SirEndii SirEndii converted this from a draft issue Jan 15, 2025
@SirEndii SirEndii added refactoring Breaking changes - Refactor to a better standard enhancement New feature or request Priority-Medium labels Jan 15, 2025
@SirEndii SirEndii added this to the 0.8r milestone Jan 15, 2025
@zyxkad
Copy link
Collaborator

zyxkad commented Jan 20, 2025

I honestly don't think bind multiple player into one inventory manager is a good idea. This needs much more complex APIs.

@SirEndii
Copy link
Member Author

Yeah I need to agree

@zyxkad
Copy link
Collaborator

zyxkad commented Feb 25, 2025

  • Slot numbers - Do they make sense how we access the armor and offhand slot, do we want to follow another/more popular standard there

Maybe we can provide dynamic slot offsets, which will return in getArmorSlotOffset(), getOffhandSlotOffset(), getCuriosSlotOffset() and such.
And if the slots do not exist, we can return -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority-Medium refactoring Breaking changes - Refactor to a better standard
Projects
Status: Backlog
Development

No branches or pull requests

2 participants