RFH: game options, post-Game:run(), setupCommands()
Posted: Sun Jun 02, 2013 2:10 am
As a follow-up to this earlier comment, I'd like to submit a formal Request For Hooks that would simplify some of my addons, and would particularly simplify combining them into ZOmnibus. To wit:
- As mentioned earlier, a hook invoked from the various generateListMumble() methods of GameOptions would be useful for addons that add game options (in my case, Auto-Transmo Gems, Opt-in Adventures Parties, Tier-1 Short Circuit Option and Alternate Zones Option). The data{} parameters would include the name of the tab for which the list is being built and the list itself, into which the hook would insert its option(s) in the usual manner.
- Game:run() invokes the ToME:run hook immediately before calling Game:runReal(); it would be useful to have another hook invoked immediately after that, for addons that want to do something at the start of the game after the character has been loaded or created and everything, including the UI, has been set up. Notes to Self displays its notes popup at this point, for instance, and some of my addons that need to convert their saved data to a new format (recently including Store Wish List) have generally done their work here, in case they needed to show a dialog to the player.
- My addons that add key commands (Timed Rest, Talent Point Planner, Notes to Self and Store Wish List) superload Game:setupCommands() to add KeyBind:addBinds() calls for their commands; a hook invoked therefrom would be useful for this. ...Hmm, actually, I suppose that would arguably be covered by the preceding hook, since Game:setupCommands() is called from Game:runReal().