public bool IsSighted(Unit Unit, TileSightLevel Level)
 {
     if (Unit.Configuration.IsAircraft())
     {
         return(true);
     }
     return(_OverrideVisibleUnits.Contains(Unit) ||
            (TileConceals(Unit, Unit.Position)
                                                                          ? Level >= TileSightLevel.HARD_SPOTTED : Level >= TileSightLevel.SIGHTED));
 }
示例#2
0
 int FogIndex(Tile Tile, TileSightLevel Level)
 {
     if (Level == TileSightLevel.NONE || Level == TileSightLevel.HARD_SPOTTED)
     {
         return((int)Level);
     }
     if (Tile.Rules.Concealing || Tile.Rules.LowProfileConcealing)
     {
         return(1);
     }
     return((int)Level + 1);
 }
        public TileSightLevel GetTileSightLevel(Tile Tile, TileSightLevel Max = TileSightLevel.HARD_SPOTTED)
        {
            if (Tile == null)
            {
                return(TileSightLevel.NONE);
            }

            var max = TileSightLevel.NONE;

            foreach (var unit in TrackingArmy.Units)
            {
                var level = GetTileSightLevel(unit, Tile);
                if (level > max)
                {
                    max = level;
                }
                if (level >= Max)
                {
                    return(max);
                }
            }
            return(max);
        }
 public bool HasTileSightLevel(Tile Tile, TileSightLevel Level)
 {
     return(GetTileSightLevel(Tile, Level) >= Level);
 }