I'm adding addon supports to modules & tome. Currently you can override existing files or dynamically change them but this wont cut it for everything. So I decided to add a hook & events system.
Example, when the player is hit it would trigger a "mod.class.Player:takeHit" event and addons can register on this event, ie:
Code: Select all
myaddon:registerHook("mod.class.Player:takeHit", function(self, value)
game.log("Arg I've been hit for %d!!!!", value)
end)
I have some that I'll add myself for they are obvious but there probably will be many more that are needed, so ask away!