lotgd / core

Core functionality for Legend of the Green Dragon, a text-based RPG game.
GNU Affero General Public License v3.0
152 stars 15 forks source link

Change module configuration to be simpler #45

Closed austenmc closed 8 years ago

austenmc commented 8 years ago

Because I want to add an onRegister/onUnregister module method to be called when modules are installed/uninstalled, I want to force a module to include a class that implements the Module interface. For simplicity, this might as well handle events too, so remove the overly-flexible existing functionality allowing modules to subscribe different events to different classes, and instead direct all events to the single module class.

Vassyli commented 8 years ago

Having a single entry point for modules is great! We maybe should even force the class name to end with Module (and the prefix to be related to the module name).

Vassyli commented 8 years ago

Aside from the use statement order, looks good to me!