From 85630501e19e6bba54a6c95d415fecc3876fb069 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 14 Jan 2017 17:55:34 +0000 Subject: [PATCH] Work around lint test limitations. --- OpenRA.Mods.Common/Lint/CheckDeathTypes.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Lint/CheckDeathTypes.cs b/OpenRA.Mods.Common/Lint/CheckDeathTypes.cs index 0fd3f11385..15b5d9a6cd 100644 --- a/OpenRA.Mods.Common/Lint/CheckDeathTypes.cs +++ b/OpenRA.Mods.Common/Lint/CheckDeathTypes.cs @@ -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().Where(s => !string.IsNullOrEmpty(s.DeathType)).Select(a => a.DeathType); + var spawnActorOnAnyDeathType = actorInfo.Value.TraitInfos().Any(s => s.DeathType == null); var deathTypes = deathAnimationDeathtypes.Concat(spawnActorDeathtypes).Distinct(); - if (!deathTypes.Any()) + if (!deathTypes.Any() || spawnActorOnAnyDeathType) continue; var targetable = actorInfo.Value.TraitInfos().SelectMany(x => x.GetTargetTypes()).ToList();