Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nelson137
Copy link
Contributor

I noticed that in many places in the codebase, it's necessary to find the inventory that contains some item (usually to get the player entity), if any exists, from the PlayerInventories system param. This simply adds a helper method find_item that does the .iter().find_map(...) that is duplicated in many places.

There is also some minor cleanup regarding ComponentStore::remove.

Copy link
Member

@zicklag zicklag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@zicklag zicklag added this pull request to the merge queue Jan 11, 2024
Merged via the queue into fishfolk:main with commit 4f01e5c Jan 11, 2024
@nelson137 nelson137 deleted the player-inv-helper branch January 11, 2024 22:30
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.

2 participants