コード例 #1
0
        //+ BRIDGE
        internal static void RegisterCommand(string cmdID, ConsoleCommand cmd)
        {
            if (IGNORE_LIST.Contains(cmdID))
            {
                return;
            }
            if (GuuConsole.commands.ContainsKey(cmdID))
            {
                SRML_LOGGER?.Log($"Found command with conflicting id '{cmdID}', adding prefix, new id is 'srml.{cmdID}'");
                GuuConsole.RegisterCommand(new SRMLCommand(cmd, $"srml.{cmdID}"));
                return;
            }

            GuuConsole.RegisterCommand(new SRMLCommand(cmd));
        }
コード例 #2
0
 //+ CONSTRUCTOR
 public SRMLCommand(SRML.Console.ConsoleCommand cmd, string id = null)
 {
     Command  = string.IsNullOrWhiteSpace(id) ? cmd.ID.ToLowerInvariant() : id;
     Original = cmd;
 }