diff --git a/OpenRA.Mods.Common/Lint/CheckUnknownTraitFields.cs b/OpenRA.Mods.Common/Lint/CheckUnknownTraitFields.cs index 9307219cfe..7e1fe3de76 100644 --- a/OpenRA.Mods.Common/Lint/CheckUnknownTraitFields.cs +++ b/OpenRA.Mods.Common/Lint/CheckUnknownTraitFields.cs @@ -64,9 +64,11 @@ namespace OpenRA.Mods.Common.Lint var traitName = NormalizeName(t.Key); // Inherits can never define children - if (traitName == "Inherits" && t.Value.Nodes.Count > 0) + if (traitName == "Inherits") { - emitError($"{t.Location} defines child nodes, which are not valid for Inherits."); + if (t.Value.Nodes.Count > 0) + emitError($"{t.Location} defines child nodes, which are not valid for Inherits."); + continue; }