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

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

fixes

File size: 1.1 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 ListPlayersExtended (manager.m_GUIConsole));
12 manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole));
13 manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole));
14 manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole));
15 } catch (Exception e) {
16 Log.Out ("Error registering custom commands: " + e);
17 }
18 /*
19 try {
20 List<ConsoleCommand> commands = manager.m_GUIConsole.commands;
21 foreach (ConsoleCommand c in commands) {
22 string name = string.Empty;
23 foreach (string cname in c.Names()) {
24 if (cname.Length > 0) {
25 if (name.Length > 0)
26 name += ", ";
27 name += cname;
28 }
29 }
30 name += " => " + c.Description();
31 Log.Out (name);
32 }
33 } catch (Exception e) {
34 Log.Out ("Error listing commands: " + e);
35 }
36 */
37 }
38}
39
Note: See TracBrowser for help on using the repository browser.