PazerOP / CastingEssentials

A Team Fortress 2 client plugin that enhances the experience of both casters and viewers.
https://Essentials.tf
BSD 2-Clause "Simplified" License
29 stars 12 forks source link

Refactor module loading #81

Closed dalegaard closed 6 years ago

dalegaard commented 6 years ago

These commits refactor the module system to do away with almost all dynamic dispatch and introduce a module registration system such that modules no longer have to be loaded manually from CastingPlugin.cpp. This makes it somewhat easier to develop new modules while keeping up with upstream.

A simple dependency mechanism is introduced, such that a module may declare a dependency on another. This works recursively, and checks for circular dependencies. A circular dependency is currently treated as an error, but it could be beneficial to allow them. I'm unsure on this.