diff --git a/OpenRA.Mods.Common/Lint/CheckUpgrades.cs b/OpenRA.Mods.Common/Lint/CheckUpgrades.cs index f198ecea31..88b7cd76db 100644 --- a/OpenRA.Mods.Common/Lint/CheckUpgrades.cs +++ b/OpenRA.Mods.Common/Lint/CheckUpgrades.cs @@ -40,8 +40,14 @@ namespace OpenRA.Mods.Common.Lint foreach (var field in fields.Where(x => x.HasAttribute())) { var values = LintExts.GetFieldValues(trait, field, emitError); - foreach (var value in values.Where(x => !upgradesGranted.Contains(x))) - emitError("Actor type `{0}` uses upgrade `{1}` that is not granted by anything!".F(actorInfo.Key, value)); + foreach (var value in values) + { + if (!upgradesGranted.Contains(value)) + emitError("Actor type `{0}` uses upgrade `{1}` that is not granted by anything!".F(actorInfo.Key, value)); + + if (actorInfo.Value.TraitInfoOrDefault() == null) + emitError("Actor type `{0}` uses upgrade `{1}`, but doesn't have the UpgradeManager trait.".F(actorInfo.Key, value)); + } } } }