From 185bef39b073f60294b29e6fab6ca796bdc81a7c Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 22 Jun 2022 16:57:23 +0200 Subject: [PATCH] Fix "Inherits" nodes being resolved as objects during linting --- OpenRA.Mods.Common/Lint/CheckUnknownTraitFields.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }