jonoxia / rpgbase

Generic Node.js/HTML5 role-playing game client/server
8 stars 6 forks source link

Allow player to cancel changing of a TACTIC #91

Open jonoxia opened 10 years ago

jonoxia commented 10 years ago

Right now if you pick TACTIC -> CHANGE -> PLAN A, you'll get back to the main menu. If you now hit the cancel button, you'll go back to the tactics menu, and you would assume that recording of the tactic has been canceled, but in fact it has not.

This is because recording is controlled by the currently_recording property of gameEngine.tacticsManager, which is set when you pick an item from the CHANGE menu. There's currently no way for it to get un-set.

May have to add an event handler to the menu system so we can register a callback to be called when a certain menu is canceled out of.... although this is the only place where we'll ever use it.

The only alternative I can think of is to create a clone of the entire battle menu system from COMBAT on down, which is exactly the same as the original commands but also has the side-effect of recording to the TacticsManager. And that sounds scary.