Items carrying visualization
64kramsystem opened this issue · comments
Description
After merging #126, basic support for items will be in place, which implements the functional part, but not the visual one.
The visual part must therefore be added. This is a matter of design first, since there isn't a single way to implement it.
At a minimum (which I think it'd be a good starting point, as in "better than nothing" 😂), we could display a bottle in the HUD, when the player has a bottle.
Alternatives & Prior Art
No response
I'm marking this as small. It's not well-defined in general terms, but the MVP version is.
I'd like to take on this task, I have some ideas and some changes I would like to make but first I'd like some input on it.
What I'm thinking of is creating an Inventory component that holds items (probably non-stackable) using an Item struct (old ItemBundle), therefore it's a good idea for the Item to not be a component but a simple struct and create a new one called DroppedComponent that holds a dropped Item.
This way the items can only be accessed via the wrapper component and logic can be treated separately instead of checking whether the entity holding the item has a transform or not.
If you think is not a good approach or is just unnecessary work I can just store entities in the inventory, and keep the transform logic.