Work around lint test limitations.

This commit is contained in:
Paul Chote
2017-01-14 17:55:34 +00:00
parent 38bd88e874
commit 85630501e1

View File

@@ -30,8 +30,9 @@ namespace OpenRA.Mods.Common.Lint
var deathAnimationDeathtypes = animations.SelectMany(x => x.DeathTypes.Select(y => y.Key)).ToList();
var spawnActorDeathtypes = actorInfo.Value.TraitInfos<SpawnActorOnDeathInfo>().Where(s => !string.IsNullOrEmpty(s.DeathType)).Select(a => a.DeathType);
var spawnActorOnAnyDeathType = actorInfo.Value.TraitInfos<SpawnActorOnDeathInfo>().Any(s => s.DeathType == null);
var deathTypes = deathAnimationDeathtypes.Concat(spawnActorDeathtypes).Distinct();
if (!deathTypes.Any())
if (!deathTypes.Any() || spawnActorOnAnyDeathType)
continue;
var targetable = actorInfo.Value.TraitInfos<ITargetableInfo>().SelectMany(x => x.GetTargetTypes()).ToList();