Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Added non-commandline options #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added non-commandline options #56

wants to merge 1 commit into from

Conversation

Viproz
Copy link

@Viproz Viproz commented Aug 19, 2014

Added the ability to enter the -1 and -2 parameters once the patcher is openned and added an error message for incorrect parameter
Changed the readline of the end to a "Press any key to continue"

Added the ability to enter the -1 and -2 parameters once the patcher is openned and added an error message for incorrect parameter
Changed the readline of the end to a "Press any key to continue"
@mikecrews
Copy link
Contributor

Thanks for taking this issue. I think the patcher options need some work.

Do you know if there is there a reason for pressing a key at all before exiting? It would be easier to automate if the patcher just printed a success or fail message and exited, wouldn't it?

I think just one command line argument will work fine. If you're working on Fougerite you need a 1st pass-only patched assembly in References. If you aren't working on Fougerite then you are installing Fougerite on a vanilla server, and you want both passes. Wouldn't it make sense to just check for "-1" and do 1st pass, otherwise do both passes?

@balu92
Copy link
Contributor

balu92 commented Aug 22, 2014

how about?

public void AutoPatch ()
{
    // if there is no FirstPass
    if (rustAssembly.MainModule.GetType("Fougerite_Patched_FirstPass") == null)
        FirstPass();

    fougeriteAssembly = AssemblyDefinition.ReadAssembly("Fougerite.dll");

    // if there is first, but no second pass, and there is fougerite.dll
    if (rustAssembly.MainModule.GetType("Fougerite_Patched_FirstPass") != null && rustAssembly.MainModule.GetType("Fougerite_Patched_SecondPass") == null && fougeriteAssembly != null)
        SecondPass();
}


//Is that really needed for anything ? It makes it harder to automate
Logger.Log("Press any key to continue...");
Console.ReadKey();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. It is not needed. Go ahead and amend the PR to remove this, and I'll merge it. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants