} // for game emulator protected override void Startup() { Debug.Init(FileLocations.PluginPersonalFolder.FullName + @"\Exceptions.txt", PluginName); SettingsFile.Init(FileLocations.GetFilterSettingsFilepath(), PluginName); LogStartup(); theFilterCore = this; defaultFirstCharacterManager = new DefaultFirstCharacterManager(loginCharacterTools); chooseCharacterManager = new LauncherChooseCharacterManager(loginCharacterTools); SteelFilterCommandExecutor = new SteelFilterCommandExecutor(); SteelFilterCommandParser = new SteelFilterCommandParser(SteelFilterCommandExecutor); Heartbeat.SetCommandParser(SteelFilterCommandParser); loginNextCharacterManager = new LoginNextCharacterManager(loginCharacterTools); thwargInventory = new ThwargInventory(); SteelFilterCommandParser.Inventory = thwargInventory; ClientDispatch += new EventHandler <NetworkMessageEventArgs>(FilterCore_ClientDispatch); ServerDispatch += new EventHandler <NetworkMessageEventArgs>(FilterCore_ServerDispatch); WindowMessage += new EventHandler <WindowMessageEventArgs>(FilterCore_WindowMessage); CommandLineText += new EventHandler <ChatParserInterceptEventArgs>(FilterCore_CommandLineText); }
public SteelFilterCommandParser(SteelFilterCommandExecutor cmdExecutor) { executor = cmdExecutor; cmdHandlers.Add(CMD_Version, VersionCommandHandler, "Display assembly version info"); cmdHandlers.Add(CMD_Help, HelpCommandHandler, "List all mf commands"); cmdHandlers.Add(CMD_Help2, HelpCommandHandler, null); cmdHandlers.Add(CMD_Help3, HelpCommandHandler, null); cmdHandlers.Add(CMD_Broadcast, BroadcastCommandHandler, "Broadcast command to other games ('/tf bc /t:red *bow*)"); cmdHandlers.Add(CMD_Broadcast2, BroadcastCommandHandler, "Broadcast command to other games ('/tf bc /t:red *bow*)"); cmdHandlers.Add(CMD_CreateTeam, CreateTeamCommandHandler, "Create team of specified characters ('/tf ct Tom Bob')"); cmdHandlers.Add(CMD_CreateTeam2, CreateTeamCommandHandler, null); cmdHandlers.Add(CMD_ShowTeams, ListTeamsCommandHandler, "Show all my teams ('/tf st')"); cmdHandlers.Add(CMD_ShowTeams2, ListTeamsCommandHandler, null); cmdHandlers.Add(CMD_JoinTeam, JoinTeamCommandHandler, "Join a team ('/tf jt red')"); cmdHandlers.Add(CMD_JoinTeam2, JoinTeamCommandHandler, null); cmdHandlers.Add(CMD_LeaveTeam, LeaveTeamCommandHandler, "Leave a team ('/tf lt red')"); cmdHandlers.Add(CMD_LeaveTeam2, LeaveTeamCommandHandler, null); cmdHandlers.Add(CMD_Test, TestCommandHandler, "Test submitting a command directly to game ('/tf test somecommandstring')"); cmdHandlers.Add(CMD_SetWindowTitle, SetWindowTitleCommandHandler, "Set window title ('/tf swt MyGame')"); cmdHandlers.Add(CMD_Inventory, InventoryCommandHandler, "List inventory to log ('/tf inv')"); cmdHandlers.Add(CMD_Inventory2, InventoryCommandHandler, null); cmdHandlers.Add(CMD_KillClient, KillClientCommandHandler, "Kill current client ('/tf kc')"); cmdHandlers.Add(CMD_KillClient2, KillClientCommandHandler, null); cmdHandlers.Add(CMD_KillAllClients, KillAllClientsCommandHandler, "Kill current client ('/tf kac')"); cmdHandlers.Add(CMD_KillAllClients2, KillAllClientsCommandHandler, null); cmdHandlers.Add(CMD_AddLoginCmd, AddLoginCmdCommandHandler, "Add login cmd to current character ('/tf alc')"); cmdHandlers.Add(CMD_AddLoginCmd2, AddLoginCmdCommandHandler, null); cmdHandlers.Add(CMD_AddLoginCmdGlobal, AddLoginCmdGlobalCommandHandler, "Add login cmd for all characters ('/tf alcg')"); cmdHandlers.Add(CMD_AddLoginCmdGlobal2, AddLoginCmdGlobalCommandHandler, null); cmdHandlers.Add(CMD_DisableWindowPosition, DisableWindowPositionCommandHandler, "Disable managing window positions ('/tf dwp')"); cmdHandlers.Add(CMD_DisableWindowPosition2, DisableWindowPositionCommandHandler, null); cmdHandlers.Add(CMD_LockWindowPosition, LockWindowPositionCommandHandler, "Save and lock window positions ('/tf lwp')"); cmdHandlers.Add(CMD_LockWindowPosition2, LockWindowPositionCommandHandler, null); cmdHandlers.Add(CMD_UnlockWindowPosition, UnlockWindowPositionCommandHandler, "Save and unlock window positions ('/tf ulwp')"); cmdHandlers.Add(CMD_UnlockWindowPosition2, UnlockWindowPositionCommandHandler, null); }