mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make SingleGame more flexible
This commit is contained in:
@@ -126,7 +126,7 @@ Options:
|
||||
case "SingleGame":
|
||||
Console.WriteLine(@"SingleGame - Process DATs for use in server environments
|
||||
-----------------------------------------
|
||||
Usage: SingleGame.exe <file|folder> [-r=rootdir|-n]
|
||||
Usage: SingleGame.exe [option] [filename|dirname]
|
||||
|
||||
Options:
|
||||
-r=rootdir Set the directory name for path size
|
||||
|
||||
@@ -38,32 +38,31 @@ namespace SabreTools
|
||||
// Output the title
|
||||
Build.Start("SingleGame");
|
||||
|
||||
_filename = args[0];
|
||||
|
||||
bool tofile = false;
|
||||
if (args.Length > 1)
|
||||
foreach (string arg in args)
|
||||
{
|
||||
for (int i = 1; i < args.Length; i++)
|
||||
switch (arg)
|
||||
{
|
||||
switch (args[i])
|
||||
{
|
||||
case "-n":
|
||||
_rename = false;
|
||||
break;
|
||||
case "-z":
|
||||
_forceunpack = false;
|
||||
break;
|
||||
case "-l":
|
||||
case "--log":
|
||||
tofile = true;
|
||||
break;
|
||||
default:
|
||||
if (args[i].StartsWith("-r"))
|
||||
{
|
||||
_path = args[i].Split('=')[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "-n":
|
||||
_rename = false;
|
||||
break;
|
||||
case "-z":
|
||||
_forceunpack = false;
|
||||
break;
|
||||
case "-l":
|
||||
case "--log":
|
||||
tofile = true;
|
||||
break;
|
||||
default:
|
||||
if (arg.StartsWith("-r"))
|
||||
{
|
||||
_path = arg.Split('=')[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
_filename = arg;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user