This PR aims to fix HarmonyX errors that show up when WeatherRegistryis not present in the modpack.
[Warning: HarmonyX] AccessTools.GetTypesFromAssembly: assembly giosuel.Imperium, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null => System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000
at HarmonyLib.AccessTools.GetTypesFromAssembly (System.Reflection.Assembly assembly) [0x0000d] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_000D
System.TypeLoadException: Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
[Warning: HarmonyX] AccessTools.GetTypesFromAssembly: assembly giosuel.Imperium, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null => System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000
at HarmonyLib.AccessTools.GetTypesFromAssembly (System.Reflection.Assembly assembly) [0x0000d] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_000D
System.TypeLoadException: Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
[Warning: HarmonyX] AccessTools.GetTypesFromAssembly: assembly giosuel.Imperium, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null => System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000
at HarmonyLib.AccessTools.GetTypesFromAssembly (System.Reflection.Assembly assembly) [0x0000d] in <474744d65d8e460fa08cd5fd82b5d65f>:IL_000D
System.TypeLoadException: Could not load type of field 'Imperium.Integration.WeatherRegistryIntegration+<>c:<>9__2_0' (1) due to: Could not load file or assembly 'WeatherRegistry, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The error comes from .Select trying to access fields from missing namespace, it's fixed by doing a normal foreach loop.
This PR aims to fix HarmonyX errors that show up when WeatherRegistryis not present in the modpack.
The error comes from
.Select
trying to access fields from missing namespace, it's fixed by doing a normal foreach loop.