The examples in the Specs book seem to indicate that components are always of a specific type and that there can be only one of that type. For example, there is only one Velocity component that uses the Mass and Force components as inputs.
Is it possible to have multiple components of the same type that are associated with an entity?
Imagine an real-time strategy game where armor components worn by units add to their total damage resistance.
I can add armor pieces dynamically to units and the score component would always reflect the total score of all the armor pieces combined for that entity. The armor components are all of the same concrete class, but may have different configurations based on which buffs it provides.
A ScoreSystem would be responsible for gathering all the ArmorComponents from Storage.
But Storage can only store one value per concrete type. So if I had multiple instances of ArmorComponent, with different configurations, how could I gather them all?
I could probably find a workaround by having different concrete classes for HeadArmor, BodyArmor, LegArmor etc, but I am interested to know whether specs supports having multiple components of the same type per entity.