public static void SetVar(ConCommandArgs args)
        {
            if (args.args.Length == 2)
            {
                GameConsole.ConsoleMessage(args.args[0].ToLower() + ": " + GetVar(args.args[0]));
            }
            else if (args.args.Length == 3)
            {

                SetVar(args.args[0], args.args[1]);
                GameConsole.ConsoleMessage(args.args[0].ToLower() +" = "+ args.args[1]);
            }
            else
            {
                GameConsole.ConsoleMessage("Usage: Set [Ident] [Value]");
            }
        }
Ejemplo n.º 2
0
 public static void Quit(ConCommandArgs args)
 {
     Watertight.GetGame().Shutdown();
 }
Ejemplo n.º 3
0
 public static void Msg(ConCommandArgs args)
 {
     GameConsole.ConsoleMessage(args.ArgString);
 }
Ejemplo n.º 4
0
 private static void ToggleConsole(ConCommandArgs args)
 {
 }
Ejemplo n.º 5
0
 private static void Ls(ConCommandArgs args)
 {
     foreach (KeyValuePair<string, ConsoleCommand> kv in commands)
     {
         ConsoleMessage(kv.Key);
     }
 }
Ejemplo n.º 6
0
 private static void InvokeCommand(string commandname, ConCommandArgs args)
 {
     MethodInfo command = commands[commandname.ToLower()].cmd;
     command.Invoke(null, new[] { args });
 }
Ejemplo n.º 7
0
        public static void DoCommand(string InString)
        {
            if (InString == string.Empty) return; //Make sure we don't react to empty strings

            string[] input = ParseInput(InString);
            string cmdString = input[0].ToLower();
            if (!commands.ContainsKey(cmdString))
            {
                ConsoleMessage("Unknown Console Command: " + input[0]);
                return;
            }
            ConsoleCommand command = commands[cmdString];
            if (!command.Silent)
            {
                ConsoleMessage("> " + InString);
            }
            ConCommandArgs args = new ConCommandArgs();
            args.CommandName = input[0];
            args.args = new string[input.Length];
            for (int i = 1; i < input.Length; i++)
            {
                args.args[i - 1] = input[i];
            }
            InvokeCommand(cmdString, args);
        }
Ejemplo n.º 8
0
 private static void ToggleConsole(ConCommandArgs args)
 {
 }
Ejemplo n.º 9
0
        private static void InvokeCommand(string commandname, ConCommandArgs args)
        {
            MethodInfo command = commands[commandname.ToLower()].cmd;

            command.Invoke(null, new[] { args });
        }
Ejemplo n.º 10
0
 public static void Quit(ConCommandArgs args)
 {
     //Watertight.GetGame().Shutdown();
 }
Ejemplo n.º 11
0
 public static void Msg(ConCommandArgs args)
 {
     GameConsole.ConsoleMessage(args.ArgString);
 }