Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes instances in inventory module where unnecessery updates happened (
#656) # Objective This pr attempts to solve some components that got triggered unnecessarily can be observed with a simple system like this: ```rust fn log_inventories(invs: Query<(Entity, &Inventory), Changed<Inventory>>) { for inv in invs.iter() { println!("inventory updated"); } } ``` the above system will print each tick when an inventory is open, this will result in systems like the one above will trigger unnecessarily # Solution To solve this I found the places where we currently "reset" some state in the inventory module each tick and replaced the modifications with alternatives that only trigger a modification if the value needed to be reset (was not in the reset state)
- Loading branch information