mattwla wrote: ↑01 Aug 2017, 23:56
I'm curious how adding a new subclass of MWWorld::Class could mess with current uses of getTypeName.
It would need to ensure all uses of the function correctly handle the new type. If some code gets the type name, the caller is going to do different things for different types, so if it can suddenly be a new type you need to find all places that use that function and ensure it behaves properly with the new type name.
raevol wrote: ↑02 Aug 2017, 00:05
This sounds like a perfect case to use polymorphism... are we not doing that?
I don't think it would help much, since most types don't have a parent/child (or an "X is a Y") relationship. Actor is the main exception, but aside from that... weapon, book, potion, clothing, ingredient, etc... they're sibling types distinct from each other.