Explorar el Código

Ensure consistent plugin load order by guid

ghorsington hace 5 años
padre
commit
7f7b6e4f03
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      BepInEx/Bootstrap/Chainloader.cs

+ 2 - 1
BepInEx/Bootstrap/Chainloader.cs

@@ -231,7 +231,8 @@ namespace BepInEx.Bootstrap
 
 				Logger.LogInfo($"{pluginInfos.Count} plugins to load");
 
-				var dependencyDict = new Dictionary<string, IEnumerable<string>>();
+				// We use a sorted dictionary to ensure consistent load order
+				var dependencyDict = new SortedDictionary<string, IEnumerable<string>>(StringComparer.InvariantCultureIgnoreCase);
 				var pluginsByGUID = new Dictionary<string, PluginInfo>();
 
 				foreach (var pluginInfoGroup in pluginInfos.GroupBy(info => info.Metadata.GUID))