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

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

fixes

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