- Timestamp:
- Jul 26, 2014, 4:41:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs
r96 r107 1 1 using System; 2 using System.Collections.Generic; 2 3 3 4 public class CommandExtensions … … 5 6 public static void InitCommandExtensions (GameManager manager) 6 7 { 7 manager.m_GUIConsole.AddCommand(new GetGamePrefs(manager.m_GUIConsole)); 8 manager.m_GUIConsole.AddCommand(new GetTime(manager.m_GUIConsole)); 9 manager.m_GUIConsole.AddCommand(new ListPlayersExtended(manager.m_GUIConsole)); 10 manager.m_GUIConsole.AddCommand(new SayToPlayer(manager.m_GUIConsole)); 11 manager.m_GUIConsole.AddCommand(new SetTimeReal(manager.m_GUIConsole)); 12 manager.m_GUIConsole.AddCommand(new ShowInventory(manager.m_GUIConsole)); 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 */ 13 37 } 14 38 }
Note:
See TracChangeset
for help on using the changeset viewer.