mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
feat: more
This commit is contained in:
1 parent
693c3f42a6
commit
b70d65f37b
4 files changed
+52
-34
No files matched your search
@@ -1,15 +1,26 @@
|
||||
using CLI.Models;
|
||||
using CLI.Utils;
|
||||
|
||||
namespace CLI.Functions
|
||||
{
|
||||
class DLC
|
||||
class Unpacker
|
||||
{
|
||||
public static void Run(Arguments args)
|
||||
public static void Unpack(string[] args)
|
||||
{
|
||||
BlitzVfs vfs = new();
|
||||
if (args.Length < 2)
|
||||
{
|
||||
throw new ArgumentException("Missing required working directory argument");
|
||||
}
|
||||
|
||||
vfs.Initialize();
|
||||
string workingDirectory = args[1];
|
||||
string paksDirectory = Path.Combine(workingDirectory, "Blitz/Content/Paks");
|
||||
string[] files = Directory.GetFiles(paksDirectory, "*.pak");
|
||||
|
||||
foreach (string file in files)
|
||||
{
|
||||
Console.WriteLine($"Reading \"{file}\"");
|
||||
}
|
||||
|
||||
// BlitzVfs vfs = new();
|
||||
|
||||
// vfs.Initialize();
|
||||
|
||||
// DefaultFileProvider provider = new(
|
||||
// directory: new(
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace CLI.Models
|
||||
{
|
||||
public class Arguments
|
||||
{
|
||||
public string[] raw;
|
||||
public bool sanitize;
|
||||
|
||||
public Arguments(string[] args)
|
||||
{
|
||||
raw = args;
|
||||
sanitize = args.Contains("--sanitize");
|
||||
|
||||
if (args.Length < 1)
|
||||
{
|
||||
throw new ArgumentException("No arguments provided");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-5
@@ -1,5 +1,4 @@
|
||||
using CLI.Functions;
|
||||
using CLI.Models;
|
||||
|
||||
namespace CLI
|
||||
{
|
||||
@@ -7,15 +6,18 @@ namespace CLI
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Arguments arguments = new(args);
|
||||
|
||||
switch (args[0])
|
||||
{
|
||||
case "dlc":
|
||||
case "unpack":
|
||||
{
|
||||
DLC.Run(arguments);
|
||||
Unpacker.Unpack(args);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
throw new ArgumentException("Invalid command");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user