Hi,
I'd like to remove unused values from a dictionary
Example:
CURRENT_ITEMS = {Sword:1, Shield:1,Dagger:0}
In this case, I'd like to remove Dagge from the dictionary, since it's equal to 0
Probably by using a setget linked to the dictionary var that remove it when it detects something with value 0
The dictionary isn't always in the same order tho, it's randomly generated based on what the player pick up.
To give some context, I'm looking to create an interface displaying the CURRENT_ITEMS dictionary. It can not be edited tho, just displayed, and updated whenever a player pickup an item; For this, I use a Inventory Grid with TextureButton, and I'm hopping to be able to somehow link the TextureButton to the dictionary