Browse Source

Added check to DisabledConfig reload for first load

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
2b7f8ae425
2 changed files with 9 additions and 0 deletions
  1. +4
    -0
      IPA.Loader/Loader/DisabledConfig.cs
  2. +5
    -0
      IPA.Loader/Loader/PluginLoader.cs

+ 4
- 0
IPA.Loader/Loader/DisabledConfig.cs View File

@ -51,6 +51,8 @@ namespace IPA.Loader
Reset = false;
}
if (!PluginLoader.IsFirstLoadComplete) return; // if the first load isn't complete, skip all of this
var referToState = unchecked(++updateState);
var copy = DisabledModIds.ToArray();
if (disableUpdateTask == null || disableUpdateTask.IsCompleted)
@ -83,6 +85,8 @@ namespace IPA.Loader
try
{
if (transaction.WillNeedRestart)
Logger.loader.Warn("Runtime disabled config reload will need game restart to apply");
return transaction.Commit().ContinueWith(t =>
{
if (t.IsFaulted)


+ 5
- 0
IPA.Loader/Loader/PluginLoader.cs View File

@ -865,6 +865,8 @@ namespace IPA.Loader
return exec;
}
internal static bool IsFirstLoadComplete { get; private set; } = false;
internal static List<PluginExecutor> LoadPlugins()
{
InitFeatures();
@ -882,6 +884,9 @@ namespace IPA.Loader
}
}
// TODO: should this be somewhere else?
IsFirstLoadComplete = true;
return list;
}
}

Loading…
Cancel
Save