Преглед на файлове

Ensure consistent plugin load order by guid

ghorsington преди 5 години
родител
ревизия
7f7b6e4f03
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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))