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

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Lint
var worldActor = map.Rules.Actors["world"];
var factions = worldActor.Traits.WithInterface<FactionInfo>().Select(f => f.InternalName).ToHashSet();
var factions = worldActor.TraitInfos<FactionInfo>().Select(f => f.InternalName).ToHashSet();
foreach (var player in players.Values)
if (!string.IsNullOrWhiteSpace(player.Faction) && !factions.Contains(player.Faction))
emitError("Invalid faction {0} chosen for player {1}.".F(player.Faction, player.Name));