I’m trying to create an entity that uses a baseclass, but the baseclass also uses another baseclass. So I’ve got base_powered, base_powerup, and powerup_entity. Base_powered is what all entities that use my power system inherit, base_powerup is what all powerups will inherit from, and powerup_entity is just the entity itself.
Powerup_entity has its ENT.Base set to “base_powerup” and then base_powerup has its ENT.Base set to “base_powered”. The issue I’m having is in powerup_entity, I can call self.BaseClass.SetupDataTables just fine and it calls base_powerup’s SetupDataTables function. But when I call self.BaseClass.SetupDataTables in base_powerup, which I would think should call base_powered’s SetupDataTables function, it is actually calling it’s own SetupDataTable and entering an infinite loop. My question is, what is the appropriate way of having ‘true inheritance’ for multiple bases?
Also do I need to call DEFINE_BASECLASS or is it done automatically for me so long as I have ENT.Base set?