public override void GameManagerAlive() { Instance = this; GUI.MenuController.AddMenu <ConsoleMenu>(new KeyCode[] { KeyCode.F2, KeyCode.BackQuote, KeyCode.Slash }); _Executor = new Parser.Executor((name, args, history_index) => { Command cmd = ResolveCommand(name); if (history_index == null && History.LastIndex > 0) { history_index = History.LastIndex - 1; } return(cmd.Run(args, history_index)); }); NormalHistory = new CommandHistory(_Executor, _Parser); LuaHistory = new CommandHistory(_Executor, _Parser); Logger.Info($"Console v{Version} loaded"); }
public CommandHistory(Parser.Executor exec, Parser.Parser parser) { _Executor = exec; _Parser = parser; }