internal void FindTargets() { if (Instance.disabledTurrets.Contains(turret.net.ID)) { return; } if (turret.target == null && turret.IsPowered()) { List <BaseAnimalNPC> localpig = new List <BaseAnimalNPC>(); Vis.Entities(turret.eyePos.transform.position, 30f, localpig); foreach (BaseCombatEntity bce in localpig) { if (string.IsNullOrEmpty(bce.ShortPrefabName)) { continue; } if (turret.ObjectVisible(bce) && !Instance.configData.exclusions.Contains(bce.ShortPrefabName)) { turret.target = bce; break; } } } }