using System; using System.Collections.Generic; public class CommandExtensions { public static void InitCommandExtensions (GameManager manager) { try { manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new ListLandProtection (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new RemoveLandProtection (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole)); manager.m_GUIConsole.AddCommand (new Version (manager.m_GUIConsole)); } catch (Exception e) { Log.Out ("Error registering custom commands: " + e); } /* try { List commands = manager.m_GUIConsole.commands; foreach (ConsoleCommand c in commands) { string name = string.Empty; foreach (string cname in c.Names()) { if (cname.Length > 0) { if (name.Length > 0) name += ", "; name += cname; } } name += " => " + c.Description(); Log.Out (name); } } catch (Exception e) { Log.Out ("Error listing commands: " + e); } */ } }