Remove unnecessary uses of Exts.IsTraitEnabled

This commit is contained in:
abcdefg30
2022-10-09 22:57:50 +02:00
committed by Gustas
parent 75f642bd09
commit d8349a429a
13 changed files with 17 additions and 18 deletions

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits.Render
void INotifyCreated.Created(Actor self)
{
// Name check can be cached but enabled check can't.
armaments = self.TraitsImplementing<Armament>().Where(a => info.Armaments.Contains(a.Info.Name)).ToArray().Where(Exts.IsTraitEnabled);
armaments = self.TraitsImplementing<Armament>().Where(a => info.Armaments.Contains(a.Info.Name)).ToArray().Where(t => !t.IsTraitDisabled);
}
float ISelectionBar.GetValue()