Add an inventory system
@patowen is already working on this.
Since Jun 30, 2024.
- Dominant language
- Rust
- Stars
- 202
- Forks
- 22
- Avg merge
- 6h 8m
- Merged PRs (30d)
- 7
Description
As a first step to adding actual gameplay, the player should be able to obtain, organize, and use resources, so to allow that, we will need to give the player an inventory. Implementing this is somewhat involved, as it has several moving parts:
- Some way to track the items a player is holding
- A GUI for the inventory that allows a player to move items around
- A way to select materials to place
- A server-authoritative inventory (at least for what items are in there, but likely for how they're organized as well to be able to know if the inventory is full)
- Serialization of the player inventory for saving
- Atomic modifications to the save file for placing and breaking blocks (to avoid item loss or duplication)
To avoid needing to implement "item entities" or an equivalent feature, breaking blocks should immediately put them in the player's inventory. This might also be a good quality-of-life feature in general to keep long-term. However, for now, if the player's inventory is full, the fallback should be the simplest to implement: The block should be erased from existence.
It shouldn't matter exactly what the inventory controls are or how certain selections are made, as long as the code is written in such a way that tweaks are feasible. Just having this feature exist at all should be the priority.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.