From 3f6f918b3d38446360f8afbdb5fb41d476bdbb69 Mon Sep 17 00:00:00 2001 From: Taryn Hill Date: Sat, 2 Jul 2016 11:06:23 -0500 Subject: [PATCH] GivesBounty: Replace Stances with ValidStances --- OpenRA.Mods.Common/Traits/GivesBounty.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/GivesBounty.cs b/OpenRA.Mods.Common/Traits/GivesBounty.cs index 4b11926664..c397852c80 100644 --- a/OpenRA.Mods.Common/Traits/GivesBounty.cs +++ b/OpenRA.Mods.Common/Traits/GivesBounty.cs @@ -10,7 +10,6 @@ #endregion using System.Collections.Generic; -using System.Linq; using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Warheads; using OpenRA.Traits; @@ -27,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits public readonly int LevelMod = 125; [Desc("Stance the attacking player needs to receive the bounty.")] - public readonly Stance[] Stances = { Stance.Neutral, Stance.Enemy }; + public readonly Stance ValidStances = Stance.Neutral | Stance.Enemy; [Desc("Whether to show a floating text announcing the won bounty.")] public readonly bool ShowBounty = true; @@ -64,7 +63,7 @@ namespace OpenRA.Mods.Common.Traits if (e.Attacker == null || e.Attacker.Disposed) return; - if (!info.Stances.Contains(e.Attacker.Owner.Stances[self.Owner])) + if (!info.ValidStances.HasStance(e.Attacker.Owner.Stances[self.Owner])) return; var warhead = e.Warhead as DamageWarhead;