Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>()

This commit is contained in:
atlimit8
2015-09-19 13:22:00 -05:00
parent 6e39a5e264
commit 9acf121eb1
48 changed files with 76 additions and 77 deletions

View File

@@ -242,7 +242,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.HasTraitInfo<ValuedInfo>())
.Sum(a => a.Info.Traits.WithInterface<ValuedInfo>().First().Cost);
.Sum(a => a.Info.TraitInfos<ValuedInfo>().First().Cost);
var harvesters = template.Get<LabelWidget>("HARVESTERS");
harvesters.GetText = () => world.Actors.Count(a => a.Owner == player && !a.IsDead && a.Info.HasTraitInfo<HarvesterInfo>()).ToString();