Exemple #1
0
 public static void AddCommands(out CommandList commands, LevelPermission perm)
 {
     commands = new CommandList();
     foreach (rankAllowance perms in allowedCommands)
     {
         bool canUse = perms.lowestRank <= perm && !perms.disallow.Contains(perm);
         if (canUse || perms.allow.Contains(perm))
         {
             commands.Add(Command.all.Find(perms.commandName));
         }
     }
 }
Exemple #2
0
        public static void AddCommands(out CommandList commands, LevelPermission perm)
        {
            commands = new CommandList();

            foreach (rankAllowance aV in allowedCommands.Where(aV => (aV.lowestRank <= perm && !aV.disallow.Contains(perm)) || aV.allow.Contains(perm)))
                commands.Add(Command.all.Find(aV.commandName));
        }