Fix RCS1061

This commit is contained in:
RoosterDragon
2023-03-18 12:16:52 +00:00
committed by Gustas
parent 5d91b678bb
commit 4dd787be13
32 changed files with 167 additions and 210 deletions

View File

@@ -109,9 +109,10 @@ namespace OpenRA.Mods.Common.Lint
}
foreach (var n in node.Value.Nodes)
if (checkArgKeys.Contains(n.Key))
if (!namedKeys.Contains(n.Value.Value) && !Hotkey.TryParse(n.Value.Value, out var unused))
emitError($"{filename} {node.Value.Value}:{n.Key} refers to a Key named `{n.Value.Value}` that does not exist.");
if (checkArgKeys.Contains(n.Key) &&
!namedKeys.Contains(n.Value.Value) &&
!Hotkey.TryParse(n.Value.Value, out var unused))
emitError($"{filename} {node.Value.Value}:{n.Key} refers to a Key named `{n.Value.Value}` that does not exist.");
}
if (node.Value.Nodes != null)