source: binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs@ 110

Last change on this file since 110 was 109, checked in by alloc, 10 years ago

fixes

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3
4public class CommandExtensions
5{
6 public static void InitCommandExtensions (GameManager manager)
7 {
8 try {
9 manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole));
10 manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole));
11 manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole));
12 manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole));
13 manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole));
14 manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole));
15 manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole));
16 manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole));
17 } catch (Exception e) {
18 Log.Out ("Error registering custom commands: " + e);
19 }
20 /*
21 try {
22 List<ConsoleCommand> commands = manager.m_GUIConsole.commands;
23 foreach (ConsoleCommand c in commands) {
24 string name = string.Empty;
25 foreach (string cname in c.Names()) {
26 if (cname.Length > 0) {
27 if (name.Length > 0)
28 name += ", ";
29 name += cname;
30 }
31 }
32 name += " => " + c.Description();
33 Log.Out (name);
34 }
35 } catch (Exception e) {
36 Log.Out ("Error listing commands: " + e);
37 }
38 */
39 }
40}
41
Note: See TracBrowser for help on using the repository browser.