Skip to content

Commit

Permalink
Added Quiet Mode to injector.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagord committed Jul 4, 2023
1 parent cdc3231 commit e2fd92c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions PulsarInjector/Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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();
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e2fd92c

Please sign in to comment.