mirror of
https://github.com/4sval/FModel.git
synced 2026-09-25 10:39:14 -05:00
important bug fixes + beginning of the final aes manager
This commit is contained in:
@@ -8,7 +8,7 @@ namespace FModel
|
||||
{
|
||||
static class AESManager
|
||||
{
|
||||
public static List<AESEntry> AESEntries { get; set; }
|
||||
/*public static List<AESEntry> AESEntries { get; set; }
|
||||
private static XmlSerializer serializer = new XmlSerializer(typeof(List<AESEntry>));
|
||||
|
||||
public static void serialize(string data)
|
||||
@@ -51,6 +51,6 @@ namespace FModel
|
||||
toReturn[i] = outputList[i].theKey;
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using FModel.Parser.Items;
|
||||
using FModel.Properties;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
@@ -262,6 +263,7 @@ namespace FModel
|
||||
//do not crash when JsonSerialization does weird stuff
|
||||
}
|
||||
}
|
||||
else { GetItemIcon(theItem); } //Trails_ID_059_Sony2 smh :thinking:
|
||||
}
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
|
||||
@@ -82,8 +82,8 @@ namespace FModel
|
||||
{
|
||||
reader.ReadBytes(24);
|
||||
|
||||
int fileLength = reader.ReadInt32();
|
||||
Console.WriteLine(fileLength);
|
||||
int AssetLength = reader.ReadInt32();
|
||||
Console.WriteLine(AssetLength);
|
||||
|
||||
reader.ReadBytes(13);
|
||||
int NamespaceCount = reader.ReadInt32();
|
||||
@@ -99,9 +99,7 @@ namespace FModel
|
||||
for (int i = 0; i < LocalizedStringArray.Length; i++)
|
||||
{
|
||||
string tag = AssetReader.readCleanString(reader);
|
||||
if (tag != "None") { LocalizedStringArray[i] = tag; }
|
||||
|
||||
Console.WriteLine(LocalizedStringArray[i]);
|
||||
if (tag != "None") { LocalizedStringArray[i] = tag; Console.WriteLine(LocalizedStringArray[i]); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace FModel
|
||||
{
|
||||
public static PakAsset MyAsset;
|
||||
public static PakExtractor MyExtractor;
|
||||
private static string[] myArray { get; set; }
|
||||
public static string[] myArray { get; set; }
|
||||
private static string currentPakToCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -70,7 +70,7 @@ namespace FModel
|
||||
/// <returns> the path of the last created file (usually the uexp file but we don't care about the extension, so it's fine) </returns>
|
||||
public static string ExtractAsset(string currentPak, string currentItem)
|
||||
{
|
||||
if (currentPak != currentPakToCheck)
|
||||
if (currentPak != currentPakToCheck || myArray == null)
|
||||
{
|
||||
MyExtractor = new PakExtractor(Settings.Default.PAKsPath + "\\" + currentPak, Settings.Default.AESKey);
|
||||
myArray = MyExtractor.GetFileList().ToArray();
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
class AssetReader
|
||||
static class AssetReader
|
||||
{
|
||||
public static string readCleanString(BinaryReader reader)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,8 @@ namespace FModel
|
||||
{
|
||||
static class ThePak
|
||||
{
|
||||
public static List<PaksEntry> mainPaksList { get; set; }
|
||||
public static List<PaksEntry> dynamicPaksList { get; set; }
|
||||
public static string CurrentUsedPak { get; set; }
|
||||
public static string CurrentUsedPakGuid { get; set; }
|
||||
public static string CurrentUsedItem { get; set; }
|
||||
@@ -85,15 +87,17 @@ namespace FModel
|
||||
}
|
||||
}
|
||||
|
||||
public struct AESEntry : IEquatable<AESEntry>
|
||||
public struct PaksEntry : IEquatable<PaksEntry>
|
||||
{
|
||||
internal AESEntry(string myKey)
|
||||
internal PaksEntry(string myPak, string myPakGuid)
|
||||
{
|
||||
theKey = myKey;
|
||||
thePak = myPak;
|
||||
thePakGuid = myPakGuid;
|
||||
}
|
||||
public string theKey { get; set; }
|
||||
public string thePak { get; set; }
|
||||
public string thePakGuid { get; set; }
|
||||
|
||||
bool IEquatable<AESEntry>.Equals(AESEntry other)
|
||||
bool IEquatable<PaksEntry>.Equals(PaksEntry other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user