AdvancedPeripherals icon indicating copy to clipboard operation
AdvancedPeripherals copied to clipboard

Inventory Manager refactoring and new features

Open SirEndii opened this issue 11 months ago • 3 comments

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 avatar Jan 15 '25 19:01 SirEndii

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

zyxkad avatar Jan 20 '25 00:01 zyxkad

Yeah I need to agree

SirEndii avatar Jan 20 '25 00:01 SirEndii

  • 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

zyxkad avatar Feb 25 '25 20:02 zyxkad