Creating a custom List or Collection

Trying to make an ambiguous Item class and instead of using inheritance for each item, I want each item to have a list of attributes that tell game (and player) how it can be used. The problem I’m facing is that there is a potential for multiple attributes of the same type on the item AND what if the attached attributes conflict with each other in terms of function.

Example: I add an attribute to the item that can allow it to be equipped as clothing. I don’t want to accidentally add an attribute that allows it to be thrown like a tomahawk or something.

Granted, the problem is really only a hypothetical and can be avoided by being careful. Just want to save time in the long run.

Make an item base class, and make other classes that inherit from the base

for example Item has all the basic stuff that every item has

make a clothing class that inherits from item, and axes class that inherits from item.
Each implement their own implementation.

There’s really no better way :slight_smile: