diff --git a/OpenRA.Mods.Common/Traits/Pluggable.cs b/OpenRA.Mods.Common/Traits/Pluggable.cs index 5e5c022d99..16f23af230 100644 --- a/OpenRA.Mods.Common/Traits/Pluggable.cs +++ b/OpenRA.Mods.Common/Traits/Pluggable.cs @@ -81,14 +81,11 @@ namespace OpenRA.Mods.Common.Traits public bool AcceptsPlug(Actor self, string type) { - if (active != null) - return false; - if (!Info.Conditions.ContainsKey(type)) return false; if (!Info.Requirements.ContainsKey(type)) - return true; + return active == null; return plugTypesAvailability[type]; } @@ -99,6 +96,9 @@ namespace OpenRA.Mods.Common.Traits if (!Info.Conditions.TryGetValue(type, out condition)) return; + if (conditionToken != ConditionManager.InvalidConditionToken) + conditionManager.RevokeCondition(self, conditionToken); + conditionToken = conditionManager.GrantCondition(self, condition); active = type; }