DamageWarhead polish

Use BitSet.IsEmpty.
This commit is contained in:
reaperrr
2020-05-08 21:47:22 +02:00
committed by abcdefg30
parent afd620b092
commit ac57a37224

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Warheads
var armor = victim.TraitsImplementing<Armor>()
.Where(a => !a.IsTraitDisabled && a.Info.Type != null && Versus.ContainsKey(a.Info.Type) &&
(shape.Info.ArmorTypes == default(BitSet<ArmorType>) || shape.Info.ArmorTypes.Contains(a.Info.Type)))
(shape.Info.ArmorTypes.IsEmpty || shape.Info.ArmorTypes.Contains(a.Info.Type)))
.Select(a => Versus[a.Info.Type]);
return Util.ApplyPercentageModifiers(100, armor);