diff --git a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs index 5f343ed786..b6cf134f0d 100644 --- a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs +++ b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs @@ -419,6 +419,10 @@ public virtual void TryStartShootSomething(bool canBeginBurstImmediately) // public virtual LocalTargetInfo TryFindNewTarget() // Core method { + if (!AttackVerb.Available()) + { + return null; + } IAttackTargetSearcher attackTargetSearcher = this.TargSearcher(); Faction faction = attackTargetSearcher.Thing.Faction; float range = this.AttackVerb.verbProps.range; diff --git a/Source/CombatExtended/CombatExtended/Verbs/VerbPropertiesCE.cs b/Source/CombatExtended/CombatExtended/Verbs/VerbPropertiesCE.cs index 21312e035f..b374c7cb0c 100644 --- a/Source/CombatExtended/CombatExtended/Verbs/VerbPropertiesCE.cs +++ b/Source/CombatExtended/CombatExtended/Verbs/VerbPropertiesCE.cs @@ -18,5 +18,6 @@ public class VerbPropertiesCE : VerbProperties public bool ejectsCasings = true; public bool ignorePartialLoSBlocker = false; public bool interruptibleBurst = true; + public List cantShotWith = new List(); } } diff --git a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs index c1102daf44..1094562581 100644 --- a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs +++ b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs @@ -268,7 +268,7 @@ public override bool Available() } } - return Projectile != null; + return Projectile != null && !VerbPropsCE.cantShotWith.Contains(Projectile); } ///