feat: more

This commit is contained in:
tresabhi committed 2025-01-25 21:42:25 -06:00
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(
-19
View File
@@ -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
View File
@@ -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");
}
}
}
}