mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
always put the export types
This commit is contained in:
parent
c6e06d958e
commit
127af65b82
|
|
@ -1,4 +1,4 @@
|
|||
namespace FModel.PakReader.IO
|
||||
namespace FModel.PakReader.IO
|
||||
{
|
||||
public readonly struct FFragment
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace FModel.PakReader.IO
|
|||
}
|
||||
}
|
||||
|
||||
private static void LoadZeroMaskData(BinaryReader reader, int numBits, out BitArray data)
|
||||
private void LoadZeroMaskData(BinaryReader reader, int numBits, out BitArray data)
|
||||
{
|
||||
if (numBits <= 8)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ namespace FModel.PakReader.Parsers.Class
|
|||
var (val, isNonZero) = it.Current;
|
||||
if (properties.TryGetValue(val, out var propertyInfo))
|
||||
{
|
||||
if (propertyInfo.Name == "AuthoredVFXData_ByPart" || propertyInfo.Name == "RequestedDataStores")
|
||||
continue;
|
||||
|
||||
if (isNonZero)
|
||||
{
|
||||
var key = Dict.ContainsKey(propertyInfo.Name) ? $"{propertyInfo.Name}_NK{num++:00}" : propertyInfo.Name;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,18 @@ namespace FModel.PakReader.Parsers
|
|||
var importedPackageId = new FPackageId(Loader);
|
||||
var arcs = Loader.ReadTArray(() => new FArc(Loader));
|
||||
graphData[i] = (importedPackageId, arcs);
|
||||
string importedPackageName = Creator.Utils.GetFullPath(importedPackageId)?.Replace($"{Folders.GetGameName()}/Content", "Game");
|
||||
string importedPackageName = Creator.Utils.GetFullPath(importedPackageId);
|
||||
{
|
||||
string gname = Folders.GetGameName();
|
||||
if (importedPackageName.StartsWith($"/{gname}/Plugins/GameFeatures"))
|
||||
{
|
||||
importedPackageName = importedPackageName.Replace($"{gname}/Plugins/GameFeatures/", "").Replace("/Content", "");
|
||||
}
|
||||
else if (importedPackageName.StartsWith($"/{gname}/Content"))
|
||||
{
|
||||
importedPackageName = importedPackageName.Replace($"{Folders.GetGameName()}/Content", "Game");
|
||||
}
|
||||
}
|
||||
if (!(Creator.Utils.GetPropertyPakPackage(importedPackageName) is IoPackage package)) continue;
|
||||
foreach (var export in package.Reader.ExportMap)
|
||||
{
|
||||
|
|
@ -145,6 +156,7 @@ namespace FModel.PakReader.Parsers
|
|||
}
|
||||
|
||||
Loader.BaseStream.Seek(currentExportDataOffset, SeekOrigin.Begin);
|
||||
_dataExportTypes[i] = exportType;
|
||||
try
|
||||
{
|
||||
if (Globals.TypeMappings.TryGetValue(exportType.String, out var properties))
|
||||
|
|
@ -156,18 +168,13 @@ namespace FModel.PakReader.Parsers
|
|||
"VirtualTexture2D" => new UTexture2D(this, properties, _ubulk, ExportMap.Sum(e => (long)e.CookedSerialSize) + beginExportOffset),
|
||||
"CurveTable" => new UCurveTable(this, properties),
|
||||
"DataTable" => new UDataTable(this, properties, exportType.String),
|
||||
//"FontFace" => new UFontFace(this, ubulk),
|
||||
"SoundWave" => new USoundWave(this, properties, _ubulk, ExportMap.Sum(e => (long)e.CookedSerialSize) + beginExportOffset),
|
||||
//"StringTable" => new UStringTable(this),
|
||||
//"AkMediaAssetData" => new UAkMediaAssetData(this, ubulk, ExportMap.Sum(e => e.SerialSize) + PackageFileSummary.TotalHeaderSize),
|
||||
_ => new UObject(this, properties, type: exportType.String),
|
||||
};
|
||||
_dataExportTypes[i] = exportType;
|
||||
}
|
||||
else
|
||||
{
|
||||
_dataExports[i] = new UObject();
|
||||
_dataExportTypes[i] = exportType;
|
||||
#if DEBUG
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace FModel.Utils
|
|||
{
|
||||
"Game" => regex.Replace(path, $"{Folders.GetGameName()}/Content", 1),
|
||||
"RegionCN" => regex.Replace(path, $"{Folders.GetGameName()}/Plugins/{trigger}/Content", 1),
|
||||
_ => !path.Contains("/Plugins/GameFeatures/") && !path.Contains($"{Folders.GetGameName()}/Content") ? regex.Replace(path, $"{Folders.GetGameName()}/Plugins/GameFeatures/{trigger}/Content", 1) : path
|
||||
_ => regex.Replace(path, $"{Folders.GetGameName()}/Plugins/GameFeatures/{trigger}/Content", 1)
|
||||
};
|
||||
|
||||
int sep = fixedPath.LastIndexOf('.');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user