diff --git a/SpecialOrdersExtended/DataModels/RecentCompletedSO.cs b/SpecialOrdersExtended/DataModels/RecentCompletedSO.cs index 4cb465c..39d9e73 100644 --- a/SpecialOrdersExtended/DataModels/RecentCompletedSO.cs +++ b/SpecialOrdersExtended/DataModels/RecentCompletedSO.cs @@ -25,6 +25,7 @@ public void Save() base.Save(identifier); } + [SuppressMessage("ReSharper", "IDE1006", Justification = "Method naming follows convention used in-game")] public void dayUpdate(uint daysPlayed) { foreach (string key in RecentOrdersCompleted.Keys) diff --git a/SpecialOrdersExtended/DialogueManager.cs b/SpecialOrdersExtended/DialogueManager.cs index 32f206c..7f2d1a4 100644 --- a/SpecialOrdersExtended/DialogueManager.cs +++ b/SpecialOrdersExtended/DialogueManager.cs @@ -103,10 +103,14 @@ public static void PostfixCheckDialogue(ref bool __result, ref NPC __instance, i __result = FindBestDialogue(baseKey, __instance, __0); if (__result) { return; } } - foreach (string cacheOrder in RecentSOManager.GetKeys(1u)) + List cacheOrders = RecentSOManager.GetKeys(1u)?.ToList(); + if (cacheOrders is not null) { - __result = FindBestDialogue(cacheOrder + "_Completed", __instance, __0); - if (__result) { return; } + foreach (string cacheOrder in cacheOrders) + { + __result = FindBestDialogue(cacheOrder + "_Completed", __instance, __0); + if (__result) { return; } + } } } catch (Exception ex) diff --git a/SpecialOrdersExtended/SpecialOrdersExtended.csproj b/SpecialOrdersExtended/SpecialOrdersExtended.csproj index 9309223..000c67c 100644 --- a/SpecialOrdersExtended/SpecialOrdersExtended.csproj +++ b/SpecialOrdersExtended/SpecialOrdersExtended.csproj @@ -7,12 +7,14 @@ enable - + + + \ No newline at end of file diff --git a/SpecialOrdersExtended/StatsManager.cs b/SpecialOrdersExtended/StatsManager.cs index dc375ea..5c4e53a 100644 --- a/SpecialOrdersExtended/StatsManager.cs +++ b/SpecialOrdersExtended/StatsManager.cs @@ -41,6 +41,7 @@ public uint GrabBasicProperty(string key, Stats stats) return 0u; } + [SuppressMessage("ReSharper", "IDE0060", Justification = "Format expected by console commands")] public void ConsoleListProperties(string command, string[] args) { if (propertyInfos.Count.Equals(0)) { GrabProperties(); }