mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Add support for new IoStore on-demand TOC format. (#662)
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Co-authored-by: Krowe Moh <27891447+Krowe-moh@users.noreply.github.com> Co-authored-by: Asval <asval.contactme@gmail.com>
This commit is contained in:
parent
30b647aa81
commit
d55d9232d4
|
|
@ -1 +1 @@
|
||||||
Subproject commit afe94b8c496eefd8020662ea11fddc63a979fb16
|
Subproject commit dc0f8183f6551f9b5bccc8aecee65807362ef297
|
||||||
|
|
@ -36,6 +36,7 @@ public class BaseIcon : UCreator
|
||||||
|
|
||||||
if (Object.TryGetValue(out FInstancedStruct[] dataList, "DataList"))
|
if (Object.TryGetValue(out FInstancedStruct[] dataList, "DataList"))
|
||||||
{
|
{
|
||||||
|
GetRarity(dataList);
|
||||||
GetSeries(dataList);
|
GetSeries(dataList);
|
||||||
Preview = Utils.GetBitmap(dataList);
|
Preview = Utils.GetBitmap(dataList);
|
||||||
}
|
}
|
||||||
|
|
@ -139,6 +140,12 @@ public class BaseIcon : UCreator
|
||||||
GetSeries(export);
|
GetSeries(export);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GetRarity(FInstancedStruct[] s)
|
||||||
|
{
|
||||||
|
if (s.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out EFortRarity _, "Rarity") == true) is { } dl)
|
||||||
|
GetRarity(dl.NonConstStruct.Get<EFortRarity>("Rarity"));
|
||||||
|
}
|
||||||
|
|
||||||
private void GetSeries(FInstancedStruct[] s)
|
private void GetSeries(FInstancedStruct[] s)
|
||||||
{
|
{
|
||||||
if (s.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FPackageIndex _, "Series") == true) is { } dl)
|
if (s.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FPackageIndex _, "Series") == true) is { } dl)
|
||||||
|
|
|
||||||
|
|
@ -491,7 +491,7 @@ public class CUE4ParseViewModel : ViewModel
|
||||||
var ioStoreOnDemandPath = Path.Combine(UserSettings.Default.GameDirectory, "..\\..\\..\\Cloud", inst[0].Value.SubstringAfterLast("/").SubstringBefore("\""));
|
var ioStoreOnDemandPath = Path.Combine(UserSettings.Default.GameDirectory, "..\\..\\..\\Cloud", inst[0].Value.SubstringAfterLast("/").SubstringBefore("\""));
|
||||||
if (!File.Exists(ioStoreOnDemandPath)) return;
|
if (!File.Exists(ioStoreOnDemandPath)) return;
|
||||||
|
|
||||||
await Provider.RegisterVfsAsync(new IoChunkToc(ioStoreOnDemandPath));
|
await Provider.RegisterVfsAsync(new IoChunkToc(ioStoreOnDemandPath, Provider.Versions));
|
||||||
var onDemandCount = await Provider.MountAsync();
|
var onDemandCount = await Provider.MountAsync();
|
||||||
FLogger.Append(ELog.Information, () =>
|
FLogger.Append(ELog.Information, () =>
|
||||||
FLogger.Text($"{onDemandCount} on-demand archive{(onDemandCount > 1 ? "s" : "")} streamed via epicgames.com", Constants.WHITE, true));
|
FLogger.Text($"{onDemandCount} on-demand archive{(onDemandCount > 1 ? "s" : "")} streamed via epicgames.com", Constants.WHITE, true));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user