Пример #1
0
        public bool MatchesDevice(SpecializedDevice device)
        {
            if (SkipUnconditionally)
            {
                return(false);
            }

            if (device == null)
            {
                return(true);
            }

            if (Devices != null)
            {
                if (!Devices.Contains(device.Device.ID))
                {
                    return(false);
                }
            }

            if (Cores != null)
            {
                if (!Cores.Contains(device.Core.ID))
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #2
0
 public void SetCore(string tag, bool addCore)
 {
     if (addCore && !Cores.Contains(tag))
     {
         Cores.Add(tag);
         IsModProvince = true;
     }
     else if (!addCore && Cores.Contains(tag))
     {
         Cores.Remove(tag);
         IsModProvince = true;
     }
 }