mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Merge pull request #526 from GhostScissors/dev
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Make downloading of chunks parallel + fix for icon generation and static meshes
This commit is contained in:
commit
fa0f6447dc
|
|
@ -1 +1 @@
|
|||
Subproject commit 0cd21c2d96068d29b812c9d0538de5654d8fbab5
|
||||
Subproject commit 4dc3db99ed8e0992938aa6d447f544bb31908ff1
|
||||
|
|
@ -58,6 +58,9 @@ public class BaseCommunity : BaseIcon
|
|||
|
||||
if (Object.TryGetValue(out FGameplayTagContainer gameplayTags, "GameplayTags"))
|
||||
CheckGameplayTags(gameplayTags);
|
||||
else if (Object.TryGetValue(out FInstancedStruct[] dataList, "DataList"))
|
||||
CheckGameplayTags(dataList);
|
||||
|
||||
if (Object.TryGetValue(out FPackageIndex cosmeticItem, "cosmetic_item"))
|
||||
CosmeticSource = cosmeticItem.Name.ToUpper();
|
||||
|
||||
|
|
@ -91,7 +94,7 @@ public class BaseCommunity : BaseIcon
|
|||
return new[] { ret };
|
||||
}
|
||||
|
||||
private void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
protected override void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
{
|
||||
if (_design == null) return;
|
||||
if (_design.DrawSource)
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ public class BaseIcon : UCreator
|
|||
2 => 8,
|
||||
3 => 4,
|
||||
4 => 5,
|
||||
5 => 5,
|
||||
_ => 10
|
||||
};
|
||||
|
||||
|
|
@ -264,14 +265,15 @@ public class BaseIcon : UCreator
|
|||
return Utils.RemoveHtmlTags(string.Format(introduced, d));
|
||||
}
|
||||
|
||||
private void CheckGameplayTags(FInstancedStruct[] dataList)
|
||||
protected void CheckGameplayTags(FInstancedStruct[] dataList)
|
||||
{
|
||||
if (dataList.FirstOrDefault(d => d.NonConstStruct?.TryGetValue(out FGameplayTagContainer _, "Tags") ?? false) is { NonConstStruct: not null } tags)
|
||||
{
|
||||
CheckGameplayTags(tags.NonConstStruct.Get<FGameplayTagContainer>("Tags"));
|
||||
}
|
||||
}
|
||||
private void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
|
||||
protected virtual void CheckGameplayTags(FGameplayTagContainer gameplayTags)
|
||||
{
|
||||
if (gameplayTags.TryGetGameplayTag("Cosmetics.Source.", out var source))
|
||||
CosmeticSource = source.Text["Cosmetics.Source.".Length..];
|
||||
|
|
|
|||
|
|
@ -253,22 +253,22 @@ public class CUE4ParseViewModel : ViewModel
|
|||
).GetAwaiter().GetResult();
|
||||
var parseTime = Stopwatch.GetElapsedTime(startTs);
|
||||
|
||||
foreach (var fileManifest in manifest.Files)
|
||||
Parallel.ForEach(manifest.Files, fileManifest =>
|
||||
{
|
||||
if (fileManifest.FileName.Equals("Cloud/IoStoreOnDemand.ini", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
IoStoreOnDemand.Read(new StreamReader(fileManifest.GetStream()));
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_fnLive.IsMatch(fileManifest.FileName))
|
||||
{
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
p.RegisterVfs(fileManifest.FileName, [fileManifest.GetStream()]
|
||||
, it => new FRandomAccessStreamArchive(it, manifest.Files.First(x => x.FileName.Equals(it)).GetStream(), p.Versions));
|
||||
}
|
||||
});
|
||||
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
FLogger.Text($"Fortnite [LIVE] has been loaded successfully in {parseTime.TotalMilliseconds}ms", Constants.WHITE, true));
|
||||
|
|
@ -282,10 +282,10 @@ public class CUE4ParseViewModel : ViewModel
|
|||
throw new Exception("Could not load latest Valorant manifest, you may have to switch to your local installation.");
|
||||
}
|
||||
|
||||
for (var i = 0; i < manifestInfo.Paks.Length; i++)
|
||||
Parallel.For(0, manifestInfo.Paks.Length, i =>
|
||||
{
|
||||
p.RegisterVfs(manifestInfo.Paks[i].GetFullName(), [manifestInfo.GetPakStream(i)]);
|
||||
}
|
||||
});
|
||||
|
||||
FLogger.Append(ELog.Information, () =>
|
||||
FLogger.Text($"Valorant '{manifestInfo.Header.GameVersion}' has been loaded successfully", Constants.WHITE, true));
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ public class GameSelectorViewModel : ViewModel
|
|||
.OrderBy(value => (int)value == ((int)value & ~0xF));
|
||||
private IEnumerable<DirectorySettings> EnumerateDetectedGames()
|
||||
{
|
||||
yield return GetUnrealEngineGame("Fortnite", "\\FortniteGame\\Content\\Paks", EGame.GAME_UE5_5);
|
||||
yield return DirectorySettings.Default("Fortnite [LIVE]", Constants._FN_LIVE_TRIGGER, ue: EGame.GAME_UE5_5);
|
||||
yield return GetUnrealEngineGame("Fortnite", "\\FortniteGame\\Content\\Paks", EGame.GAME_UE5_6);
|
||||
yield return DirectorySettings.Default("Fortnite [LIVE]", Constants._FN_LIVE_TRIGGER, ue: EGame.GAME_UE5_6);
|
||||
yield return GetUnrealEngineGame("Pewee", "\\RogueCompany\\Content\\Paks", EGame.GAME_RogueCompany);
|
||||
yield return GetUnrealEngineGame("Rosemallow", "\\Indiana\\Content\\Paks", EGame.GAME_UE4_21);
|
||||
yield return GetUnrealEngineGame("Catnip", "\\OakGame\\Content\\Paks", EGame.GAME_Borderlands3);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user