From e2fd92cbcce788a19dfa024c15bc278ae361170a Mon Sep 17 00:00:00 2001 From: DragonFire47 <46509577+DragonFire47@users.noreply.github.com> Date: Tue, 4 Jul 2023 14:19:52 -0700 Subject: [PATCH] Added Quiet Mode to injector.cs --- PulsarInjector/Injector.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/PulsarInjector/Injector.cs b/PulsarInjector/Injector.cs index 628441b..bb883cb 100644 --- a/PulsarInjector/Injector.cs +++ b/PulsarInjector/Injector.cs @@ -13,11 +13,21 @@ namespace PulsarInjector { class Injector { + static bool QuietMode = false; [STAThread] //Required for file dialog to work static void Main(string[] args) { string targetAssemblyPath = null; + foreach (string arg in args) + { + if (arg.ToLower().Contains("-q") && !arg.Contains(Path.DirectorySeparatorChar)) + { + QuietMode = true; + break; + } + } + //Attempt install to argument path if (args.Length > 0) { @@ -41,6 +51,11 @@ static void Main(string[] args) if (targetAssemblyPath != null) { + if(QuietMode && AttemptInstallModLoader(targetAssemblyPath)) + { + return; + } + Logger.Info("Install the mod loader here?"); Logger.Info("(Y/N)"); string answer = Console.ReadLine(); @@ -279,6 +294,11 @@ static void CopyAssemblies(string targetAssemblyDir) static string CheckForUpdates(string CurrentPMLDll) { + if(QuietMode) + { + return CurrentPMLDll; + } + string version = System.Diagnostics.FileVersionInfo.GetVersionInfo(CurrentPMLDll).FileVersion; bool useOtherDll = false;