How many items are you expecting? 30 or 300?
Consider the following:
- the player has a Name Set, it’s a list of unique names. They can be added or removed but an entry cannot appear twice on that list:
- above, the Interface call returns the Name of the Item and we add it to the
Item List
Set - when it’s time to use an item, we query the Item List container to see if the item is there
- this way you only have 1 variable rather than dozens of branching, cascading Booleans
- for this to work the Item would have to interpret the Interface message like so:
- each item has a Name variable and you get to define it
You could use enumerators instead - less prone to typos. Working with 30 enums is a OK, working with 300 enums - not so much, though.