From c84d088dfa0558d939a70a3aacf9d9d1cae4a7d0 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 17 Oct 2024 18:01:04 +0100 Subject: [PATCH] Fix lint test. --- OpenRA.Mods.Common/Lint/CheckFluentReferences.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs b/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs index 46701403e0..06de003b79 100644 --- a/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs +++ b/OpenRA.Mods.Common/Lint/CheckFluentReferences.cs @@ -291,12 +291,11 @@ namespace OpenRA.Mods.Common.Lint Utility.GetFields(typeof(ModContent)), new[] { modContent }, (obj, field) => $"`ModContent.{field.Name}` in mod.yaml"); - foreach (var package in modContent.Packages) - GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( - usedKeys, testedFields, - Utility.GetFields(typeof(ModContent.ModPackage)), - new[] { package.Value }, - (obj, field) => $"`ModContent.Packages.ContentPackage@{package.Key}.{field.Name}` in mod.yaml"); + GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( + usedKeys, testedFields, + Utility.GetFields(typeof(ModContent.ModPackage)), + modContent.Packages.Values.ToArray(), + (obj, field) => $"`ModContent.Packages.ContentPackage.{field.Name}` in mod.yaml"); GetUsedTranslationKeysFromFieldsWithTranslationReferenceAttribute( usedKeys, testedFields,