From 958fdc5dc55848309090831e1b6e697cbd338813 Mon Sep 17 00:00:00 2001 From: CasDragon <91767316+CasDragon@users.noreply.github.com> Date: Tue, 20 Jan 2026 09:10:56 -0500 Subject: [PATCH 1/3] add more null checks --- RespecWrath/Main.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/RespecWrath/Main.cs b/RespecWrath/Main.cs index 570b9aa..c57f0af 100644 --- a/RespecWrath/Main.cs +++ b/RespecWrath/Main.cs @@ -925,12 +925,18 @@ public static void PatchLibrary() { foreach (var selection in ((BlueprintFeatureSelection)background)?.AllFeatures) { - tempbackgroundlist.Add(selection); - if (selection.GetType() == typeof(BlueprintFeatureSelection)) + if (selection != null) { - foreach (var selection2 in ((BlueprintFeatureSelection)selection)?.AllFeatures) + tempbackgroundlist.Add(selection); + if (selection.GetType() == typeof(BlueprintFeatureSelection)) { - tempbackgroundlist.Add(selection2); + foreach (var selection2 in ((BlueprintFeatureSelection)selection)?.AllFeatures) + { + if (selection2 != null) + { + tempbackgroundlist.Add(selection2); + } + } } } } @@ -1049,4 +1055,4 @@ public enum ExtraPointsType P25 } } -} \ No newline at end of file +} From 610a98195c93f500a24458637e04636b7689fa6a Mon Sep 17 00:00:00 2001 From: CasDragon <91767316+CasDragon@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:15:51 -0500 Subject: [PATCH 2/3] Kuru suggestions --- RespecWrath/Main.cs | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/RespecWrath/Main.cs b/RespecWrath/Main.cs index c57f0af..d22cf53 100644 --- a/RespecWrath/Main.cs +++ b/RespecWrath/Main.cs @@ -914,30 +914,20 @@ public static void PatchLibrary() { Main.logger.Log("Library data gathering initiated"); DeityBackground.DeityFeatures = DeityBackground.DeitySelect?.AllFeatures.Select(a => a).ToArray(); - var tempbackgroundlist = new List(); - tempbackgroundlist.Add(DeityBackground.BackgroundSelect); - foreach (var background in DeityBackground.BackgroundSelect?.AllFeatures) + List tempbackgroundlist = [DeityBackground.BackgroundSelect]; + foreach (var background in DeityBackground.BackgroundSelect?.AllFeatures.NotNull()) { - if (background != null) + tempbackgroundlist.Add(background); + if (background is BlueprintFeatureSelection background1) { - tempbackgroundlist.Add(background); - if (background.GetType() == typeof(BlueprintFeatureSelection)) + foreach (var selection in background1?.AllFeatures.NotNull()) { - foreach (var selection in ((BlueprintFeatureSelection)background)?.AllFeatures) + tempbackgroundlist.Add(selection); + if (selection is BlueprintFeatureSelection selection1) { - if (selection != null) + foreach (var selection2 in selection1?.AllFeatures.NotNull()) { - tempbackgroundlist.Add(selection); - if (selection.GetType() == typeof(BlueprintFeatureSelection)) - { - foreach (var selection2 in ((BlueprintFeatureSelection)selection)?.AllFeatures) - { - if (selection2 != null) - { - tempbackgroundlist.Add(selection2); - } - } - } + tempbackgroundlist.Add(selection2); } } } From f1a5e81f36b45ae35f7f650d61b7c23c5ce093cc Mon Sep 17 00:00:00 2001 From: CasDragon <91767316+CasDragon@users.noreply.github.com> Date: Tue, 20 Jan 2026 11:57:18 -0500 Subject: [PATCH 3/3] ADDB changes --- RespecWrath/Main.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RespecWrath/Main.cs b/RespecWrath/Main.cs index d22cf53..a19659a 100644 --- a/RespecWrath/Main.cs +++ b/RespecWrath/Main.cs @@ -915,17 +915,17 @@ public static void PatchLibrary() Main.logger.Log("Library data gathering initiated"); DeityBackground.DeityFeatures = DeityBackground.DeitySelect?.AllFeatures.Select(a => a).ToArray(); List tempbackgroundlist = [DeityBackground.BackgroundSelect]; - foreach (var background in DeityBackground.BackgroundSelect?.AllFeatures.NotNull()) + foreach (var background in DeityBackground.BackgroundSelect?.AllFeatures.NotNull() ?? []) { tempbackgroundlist.Add(background); if (background is BlueprintFeatureSelection background1) { - foreach (var selection in background1?.AllFeatures.NotNull()) + foreach (var selection in background1?.AllFeatures.NotNull() ?? []) { tempbackgroundlist.Add(selection); if (selection is BlueprintFeatureSelection selection1) { - foreach (var selection2 in selection1?.AllFeatures.NotNull()) + foreach (var selection2 in selection1?.AllFeatures.NotNull() ?? []) { tempbackgroundlist.Add(selection2); }