Skip to content

Commit

Permalink
Fixed Fallout 4 loadorder issue
Browse files Browse the repository at this point in the history
Fixed issues that could cause plugins to deactivate when changing a
plugin load order.
  • Loading branch information
DuskDweller committed May 3, 2016
1 parent 369d0fc commit cd1a681
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,14 @@ private void AddMissingElements(IList<string> p_lstOrdered, bool p_booPluginFile
/// </summary>
/// <remarks>
/// <param name="p_strPlugins">The list of plugins in the desired order.</param>
/// </remarks>
public void SetLoadOrder(string[] p_strPlugins)
{
string[] strOrderedPluginNames;
List<string> lstActiveList = new List<string>();

if ((LastValidActiveList != null) && (LastValidActiveList.Count() > 0))
lstActiveList = new List<string>(StripPluginDirectory(LastValidActiveList.ToArray()));

if ((p_strPlugins == null) || (p_strPlugins.Length == 0))
return;
Expand Down Expand Up @@ -1018,7 +1023,7 @@ public void SetLoadOrder(string[] p_strPlugins)
for (int i = 0; i < strOrderedPluginNames.Count(); i++)
{
string strPlugin = strOrderedPluginNames[i];
if (LastValidActiveList.Contains(strPlugin))
if (lstActiveList.Contains(strPlugin, StringComparer.InvariantCultureIgnoreCase))
strPluginNames[(i + offset)] = "*" + strPlugin;
else
strPluginNames[(i + offset)] = strPlugin;
Expand Down

0 comments on commit cd1a681

Please sign in to comment.