Implement a new inventory API by caelunshun · Pull Request #221 · feather-rs/feather · GitHub
Skip to content

Implement a new inventory API - #221

Merged
caelunshun merged 6 commits into
developfrom
inventory-refactor
May 18, 2020
Merged

Implement a new inventory API#221
caelunshun merged 6 commits into
developfrom
inventory-refactor

Conversation

@caelunshun

Copy link
Copy Markdown
Member

The old inventory design had a key problem: It could not correctly handle slot indexing in different contexts. As per this page, indices in the protocol take different forms depending on the current window. The old API used raw indices based on those used for the main inventory context, but this cannot be extended to work with other windows, such as crafting tables, chests, etc.

The new design hopes to solve the above.

Resolves #79.

@caelunshun caelunshun added this to the 0.7 milestone May 12, 2020
@Defman

Defman commented May 12, 2020

Copy link
Copy Markdown
Member

@Defman

Defman commented May 12, 2020

Copy link
Copy Markdown
Member

Also, which kinds of operations do we expect users to have a need for?
The ability to subtract and add a number of items based on attributes? Ie, type, tags, durability, and etc?

Would these operations be carried out on the entire inventory or a subset, ie hotbar and armor?

@caelunshun
caelunshun marked this pull request as ready for review May 18, 2020 17:53
@caelunshun

Copy link
Copy Markdown
Member Author

@caelunshun
caelunshun merged commit 615ded0 into develop May 18, 2020
@caelunshun
caelunshun deleted the inventory-refactor branch May 18, 2020 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correctly handle inventory indexing

3 participants