Make SupportPowerChargeBar conditional

This commit is contained in:
Mustafa Alperen Seki
2018-01-14 13:17:33 +03:00
committed by abcdefg30
parent ce63dd33db
commit 99eedfd0e7
2 changed files with 11 additions and 8 deletions

View File

@@ -124,7 +124,8 @@ namespace OpenRA.Mods.Common.Traits
return NoInstances;
return a.TraitsImplementing<SupportPower>()
.Select(t => Powers[MakeKey(t)]);
.Select(t => Powers[MakeKey(t)])
.Where(p => p.Instances.Any(i => !i.IsTraitDisabled && i.Self == a));
}
public void PrerequisitesAvailable(string key)