NobleDraconian/Dragon-Engine

Modules should be able to be auto-initialized with an Init() method

Opened this issue · 1 comments

Currently, the framework has no way of auto-initializing modules it loads. If modules have an API method named Init(), the framework should automatically call that method to initialize the module.

This is useful in cases where a shared module wants access to framework resources.

One thing to note : How should modules determine whether or not their table's __index metamethod should be set by the framework? There are cases where a module could have an Init() method but the module does not want the framework to auto call it, e.g. a Team class that has __index already set. Perhaps the method the framework looks for should be called FrameworkInit() or somesuch?