diff --git a/CUE4Parse b/CUE4Parse index 0cd21c2d..4dc3db99 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 0cd21c2d96068d29b812c9d0538de5654d8fbab5 +Subproject commit 4dc3db99ed8e0992938aa6d447f544bb31908ff1 diff --git a/FModel/Creator/Bases/FN/BaseCommunity.cs b/FModel/Creator/Bases/FN/BaseCommunity.cs index bd4b673c..8ac06a9d 100644 --- a/FModel/Creator/Bases/FN/BaseCommunity.cs +++ b/FModel/Creator/Bases/FN/BaseCommunity.cs @@ -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) diff --git a/FModel/Creator/Bases/FN/BaseIcon.cs b/FModel/Creator/Bases/FN/BaseIcon.cs index d1b5971d..d8616c09 100644 --- a/FModel/Creator/Bases/FN/BaseIcon.cs +++ b/FModel/Creator/Bases/FN/BaseIcon.cs @@ -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("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..]; diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 11c97581..b20c3095 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -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)); diff --git a/FModel/ViewModels/GameSelectorViewModel.cs b/FModel/ViewModels/GameSelectorViewModel.cs index c8bdd253..b535855d 100644 --- a/FModel/ViewModels/GameSelectorViewModel.cs +++ b/FModel/ViewModels/GameSelectorViewModel.cs @@ -87,8 +87,8 @@ public class GameSelectorViewModel : ViewModel .OrderBy(value => (int)value == ((int)value & ~0xF)); private IEnumerable 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);