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

Nested inventories #208

Open
Nordsoft91 opened this issue May 11, 2024 · 4 comments
Open

Nested inventories #208

Nordsoft91 opened this issue May 11, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Nordsoft91
Copy link

Implement nested inventories, where InventoryItem can have Inventory as well (e.g. bag to carry extra items) or Slots (e.g. sword with slots for gems)

@peter-kish peter-kish added the enhancement New feature or request label May 12, 2024
@peter-kish
Copy link
Owner

I know a lot of games do these sort of things, but I still think it's an exotic feature and I'm not sure if it's worth investing time into... That said, I still want the user to be able to implement features like these.

The first one could perhaps be implemented by extending the InventoryItem class and adding a child Inventory Node. This of course gets a bit more complicated if the bag weight needs to be adjusted when adding items, the parent inventory capacity needs to be checked when adding items etc.

Items with slots could be done in a similar way, though the UI could be difficult to implement as the gloot UI classes currently don't support displaying anything other than the item image.

I'll spend some time thinking about this. Hopefully I'll come up with something that makes things like this easily implementable by the user.

@Nordsoft91
Copy link
Author

Actually, what prevents of making all InventoryItems deriving Inventory? Of course there are difficulties, and probably redesigning of signals system will be needed, but in general it could be a concept.

@peter-kish
Copy link
Owner

I think that would be a bit to much.. Deriving from a whole class (that is quite complex to begin with) for just a few features sounds like bad design and introduces a lot of unnecessary complexity.

@TheYellowArchitect
Copy link
Contributor

I suggest having a seperate addon for nested inventories, which is essentially a fork of this addon. So its optional for whoever wants to use nested inventories. Anyway, 3.0 is priority for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants