Skip to content

Commit

Permalink
Add custom PAKTool
Browse files Browse the repository at this point in the history
  • Loading branch information
N3rdL0rd committed Aug 25, 2024
1 parent bba00d5 commit 51a369d
Show file tree
Hide file tree
Showing 12 changed files with 631 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
test/
env/
env/
PakTool/.vs/
PakTool/bin/
PakTool/obj/
PakTool/PAKTool.pdb
*ref.hx
14 changes: 14 additions & 0 deletions PAKTool/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("PAKTool")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PAKTool")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("72731be3-1523-4543-9287-f1205e754f6d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
33 changes: 33 additions & 0 deletions PAKTool/DirectoryData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Decompiled with JetBrains decompiler
// Type: PAKTool.DirectoryData
// Assembly: PAKTool, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: ECC9A4AB-62C6-4F7C-95CE-FBC3CF0F40A2
// Assembly location: D:\SteamLibrary\steamapps\common\Dead Cells\ModTools\PAKTool.exe

using System.Collections.Generic;

#nullable disable
namespace PAKTool
{
internal class DirectoryData : EntryData
{
public override bool isDirectory => true;

public DirectoryData(DirectoryData _parent, string _name)
: base(_parent, _name)
{
}

public void AddEntry(EntryData _entry)
{
if (_entry.isDirectory)
this.directories.Add((DirectoryData) _entry);
else
this.files.Add((FileData) _entry);
}

public List<FileData> files { get; private set; } = new List<FileData>();

public List<DirectoryData> directories { get; private set; } = new List<DirectoryData>();
}
}
35 changes: 35 additions & 0 deletions PAKTool/EntryData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Decompiled with JetBrains decompiler
// Type: PAKTool.EntryData
// Assembly: PAKTool, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: ECC9A4AB-62C6-4F7C-95CE-FBC3CF0F40A2
// Assembly location: D:\SteamLibrary\steamapps\common\Dead Cells\ModTools\PAKTool.exe

using System.IO;

#nullable disable
namespace PAKTool
{
internal abstract class EntryData
{
public abstract bool isDirectory { get; }

public string name { get; private set; }

public string fullName
{
get
{
DirectoryData parent = this.parent;
return parent != null ? Path.Combine(parent.fullName, this.name) : this.name;
}
}

public DirectoryData parent { get; private set; }

public EntryData(DirectoryData _parent, string _name)
{
this.name = _name;
this.parent = _parent;
}
}
}
28 changes: 28 additions & 0 deletions PAKTool/FileData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Decompiled with JetBrains decompiler
// Type: PAKTool.FileData
// Assembly: PAKTool, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: ECC9A4AB-62C6-4F7C-95CE-FBC3CF0F40A2
// Assembly location: D:\SteamLibrary\steamapps\common\Dead Cells\ModTools\PAKTool.exe

#nullable disable
namespace PAKTool
{
internal class FileData : EntryData
{
public int position { get; private set; }

public int size { get; private set; }

public int checksum { get; private set; }

public override bool isDirectory => false;

public FileData(DirectoryData _parent, string _name, int _position, int _size, int _crc)
: base(_parent, _name)
{
this.position = _position;
this.size = _size;
this.checksum = _crc;
}
}
}
Loading

0 comments on commit 51a369d

Please sign in to comment.