Fix restart option (no longer gives error about game currently running)
All checks were successful
Build / Build Launcher (push) Successful in 1m57s
All checks were successful
Build / Build Launcher (push) Successful in 1m57s
Prevent local plugin info from being logged to game logs (now only logs to pluginloader's loader.log)
This commit is contained in:
@@ -88,7 +88,7 @@ public class LocalPlugin : PluginData
|
||||
return null;
|
||||
|
||||
var assembly = Assembly.LoadFile(assemblyPath);
|
||||
LogFile.WriteLine("Resolving " + assembly.GetName().Name + " for " + args.RequestingAssembly?.FullName);
|
||||
LogFile.WriteLine("Resolving " + assembly.GetName().Name + " for " + args.RequestingAssembly?.FullName, false);
|
||||
|
||||
var main = Main.Instance;
|
||||
if (!main.Config.IsEnabled(assemblyPath))
|
||||
|
@@ -106,7 +106,7 @@ public static class LoaderTools
|
||||
public static void Restart()
|
||||
{
|
||||
Process.Start("explorer.exe", "steam://rungameid/244850");
|
||||
Environment.Exit(0);
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
public static void ExecuteMain(SEPMPlugin plugin)
|
||||
|
@@ -79,16 +79,24 @@ public class PluginConfig
|
||||
var toRemove = new List<string>();
|
||||
|
||||
var sb = new StringBuilder("Enabled plugins: ");
|
||||
var localPlugins = new StringBuilder("Local plugins: ");
|
||||
foreach (var id in EnabledPlugins)
|
||||
if (!plugins.Contains(id))
|
||||
{
|
||||
if (!plugins.TryGetPlugin(id, out var plugin))
|
||||
{
|
||||
LogFile.WriteLine($"{id} was in the config but is no longer available");
|
||||
LogFile.WriteLine($"{id} was in the config but is no longer available", false);
|
||||
toRemove.Add(id);
|
||||
}
|
||||
else
|
||||
else if (!plugin.IsLocal)
|
||||
{
|
||||
sb.Append(id).Append(", ");
|
||||
}
|
||||
else
|
||||
{
|
||||
localPlugins.Append(id).Append(", ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (EnabledPlugins.Count > 0)
|
||||
sb.Length -= 2;
|
||||
@@ -96,6 +104,11 @@ public class PluginConfig
|
||||
sb.Append("None");
|
||||
LogFile.WriteLine(sb.ToString());
|
||||
|
||||
if (localPlugins.Length > 15)
|
||||
localPlugins.Length -= 2;
|
||||
else
|
||||
localPlugins.Append("None");
|
||||
LogFile.WriteLine(localPlugins.ToString(), false);
|
||||
|
||||
foreach (var id in toRemove)
|
||||
EnabledPlugins.Remove(id);
|
||||
|
@@ -102,7 +102,7 @@ public class PluginInstance
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
LogFile.WriteLine($"Registered {count} session components from: {mainAssembly.FullName}");
|
||||
LogFile.WriteLine($"Registered {count} session components from: {mainAssembly.FullName}", !data.IsLocal);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user