Replace .WithInterface<T>().Any() => .HasTraitInfo<T>()

This commit is contained in:
atlimit8
2015-09-19 12:38:16 -05:00
parent b38b6eadd0
commit 6e39a5e264
4 changed files with 6 additions and 6 deletions

View File

@@ -241,7 +241,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var assets = template.Get<LabelWidget>("ASSETS");
assets.GetText = () => "$" + world.Actors
.Where(a => a.Owner == player && !a.IsDead && a.Info.Traits.WithInterface<ValuedInfo>().Any())
.Where(a => a.Owner == player && !a.IsDead && a.Info.HasTraitInfo<ValuedInfo>())
.Sum(a => a.Info.Traits.WithInterface<ValuedInfo>().First().Cost);
var harvesters = template.Get<LabelWidget>("HARVESTERS");