Discord RPC pak count fix + challenges fix v1

This commit is contained in:
iAmAsval 2020-11-05 20:43:55 +01:00
parent b10dfcc2a6
commit 49c8a40bca
8 changed files with 16 additions and 10 deletions

View File

@ -22,7 +22,7 @@ namespace FModel.Grabber.Paks
{
static class PaksGrabber
{
private static readonly Regex _pakFileRegex = new Regex(@"^FortniteGame/Content/Paks/pakchunk(?:0|10.*|\w+)-WindowsClient\.(pak|utoc|ucas)$", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
private static readonly Regex _pakFileRegex = new Regex(@"^FortniteGame/Content/Paks/pakchunk(?:0|10.*|\w+)-WindowsClient\.(pak|ucas)$", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
public static async Task PopulateMenu()
{

View File

@ -36,7 +36,7 @@ namespace FModel.PakReader.Parsers.Class
internal UCurveTable(IoPackageReader reader, IReadOnlyDictionary<int, PropertyInfo> properties)
{
reader.ReadUInt16(); // don't ask me
reader.ReadUInt32(); // what is this
reader.ReadUInt32(); // what this is
int NumRows = reader.ReadInt32();
CurveTableMode = (ECurveTableMode)reader.ReadByte();

View File

@ -41,7 +41,6 @@ namespace FModel.PakReader.Parsers.Class
#endif
var num = 1;
do
{
var (val, isNonZero) = it.Current;

View File

@ -149,8 +149,8 @@ namespace FModel.PakReader.Parsers
{
_dataExports[i] = exportType.String switch
{
"Texture2D" => new UTexture2D(this, properties, _ubulk,
ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
"Texture2D" => new UTexture2D(this, properties, _ubulk, ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
"TextureCube" => new UTexture2D(this, properties, _ubulk, ExportMap.Sum(e => (long) e.CookedSerialSize) + beginExportOffset),
"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),

View File

@ -60,8 +60,8 @@ namespace FModel.PakReader.Parsers.Objects
"ColorMaterialInput" => new FColorMaterialInput(reader),
"ExpressionInput" => new FMaterialInput(reader),
//
"PrimaryAssetType" => new FPrimaryAssetType(reader),
"PrimaryAssetId" => new FPrimaryAssetId(reader),
//"PrimaryAssetType" => new FPrimaryAssetType(reader),
//"PrimaryAssetId" => new FPrimaryAssetId(reader),
_ => Fallback(reader, structName)
};
}

View File

@ -275,7 +275,7 @@ namespace FModel.ViewModels.MenuItem
}).ContinueWith(t =>
{
DiscordIntegration.Update(
$"{Globals.CachedPakFiles.Count}/{MenuItems.pakFiles.GetReaderCount()} {Properties.Resources.PakFiles}",
$"{Globals.CachedPakFiles.Count + Globals.CachedIoStores.Count}/{MenuItems.pakFiles.GetReaderCount()} {Properties.Resources.PakFiles}",
string.Format("{0} - {1}", Globals.Game.GetName(),
mode == EPakLoader.All ? Properties.Resources.AllFiles :
mode == EPakLoader.New ? Properties.Resources.NewFiles :

View File

@ -38,7 +38,14 @@ namespace FModel.Windows.SoundPlayer
{
get
{
return CanSeek ? (long)(_vorbisReader.TotalTime.TotalSeconds * _waveFormat.SampleRate * _waveFormat.Channels) : 0;
try
{
return CanSeek ? (long)(_vorbisReader.TotalTime.TotalSeconds * _waveFormat.SampleRate * _waveFormat.Channels) : 0;
}
catch (Exception)
{
return 0;
}
}
}

View File

@ -1,4 +1,4 @@
# FModel
# FModel [![Build status](https://ci.appveyor.com/api/projects/status/bqipyycg1404acyt/branch/master?svg=true)](https://ci.appveyor.com/project/iAmAsval/fmodel/branch/master)
<img src="https://cdn.asval.tk/i/FModel.png" align="right" alt="FModel Logo" width="128" height="128">