diff --git a/1.3/Assemblies/ResearchWhatever.dll b/1.3/Assemblies/ResearchWhatever.dll index 2097a2e..df4aaa1 100644 Binary files a/1.3/Assemblies/ResearchWhatever.dll and b/1.3/Assemblies/ResearchWhatever.dll differ diff --git a/Source/ResearchWhatever13/Patches/StaticConstructorOnStartupUtilityPatch.cs b/Source/ResearchWhatever13/Patches/StaticConstructorOnStartupUtilityPatch.cs index 2deb420..3888c1d 100644 --- a/Source/ResearchWhatever13/Patches/StaticConstructorOnStartupUtilityPatch.cs +++ b/Source/ResearchWhatever13/Patches/StaticConstructorOnStartupUtilityPatch.cs @@ -13,7 +13,7 @@ namespace ResearchWhatever { //[HarmonyPatch(typeof(StaticConstructorOnStartupUtility), "CallAll")] [HarmonyPatch] - static class StaticConstructorOnStartupUtility_CallAll_NonUnoPinataPatch + static class StaticConstructorOnStartupUtility_CallAll_ResearchWhateverPatch { internal static MethodBase TargetMethod() { @@ -33,13 +33,16 @@ namespace ResearchWhatever { List list = new List( from x in DefDatabase.AllDefsListForReading - where x.thingClass == typeof(Building_ResearchBench) || x.thingClass.IsSubclassOf(typeof(Building_ResearchBench)) + where x.thingClass == typeof(Building_ResearchBench) || x.thingClass != null && x.thingClass.IsSubclassOf(typeof(Building_ResearchBench)) select x); - foreach (var thing in list) - { - thing?.comps.Add(new CompProperties(typeof(ResearchWhateverComp))); - } + if (list.NullOrEmpty()) + return; + else + foreach (var thing in list) + { + thing?.comps?.Add(new CompProperties(typeof(ResearchWhateverComp))); + } } } } diff --git a/Source/ResearchWhatever13/Patches/WorkGiver_ResearcherPatch.cs b/Source/ResearchWhatever13/Patches/WorkGiver_ResearcherPatch.cs index efcebbd..ff0eeee 100644 --- a/Source/ResearchWhatever13/Patches/WorkGiver_ResearcherPatch.cs +++ b/Source/ResearchWhatever13/Patches/WorkGiver_ResearcherPatch.cs @@ -13,7 +13,6 @@ namespace ResearchWhatever.Patches static bool Prefix(ref bool __result) { __result = false; - //Log.Message($"ShouldSkip={__result}"); return false; } } diff --git a/change.log b/change.log index 0fb9edf..474f610 100644 --- a/change.log +++ b/change.log @@ -1,4 +1,7 @@ -1.0.0.1 +1.0.1 +- did stuff that maybe could help somebody; + +1.0.0.1 - grammar; 1.0.0