From 664ddfcb7f98aadb30fe0b65c2b37e8f16c98c96 Mon Sep 17 00:00:00 2001 From: iAmAsval Date: Mon, 6 Sep 2021 18:21:44 +0200 Subject: [PATCH] because human input can be trusted --- .github/ISSUE_TEMPLATE/bug.yml | 45 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++ .github/ISSUE_TEMPLATE/feature.yml | 22 +++++++++++ CUE4Parse | 2 +- FModel/Constants.cs | 2 +- FModel/ViewModels/AesManagerViewModel.cs | 4 +- FModel/ViewModels/ApplicationViewModel.cs | 3 +- FModel/ViewModels/CUE4ParseViewModel.cs | 4 +- FModel/ViewModels/Commands/LoadCommand.cs | 8 ++++ FModel/Views/About.xaml | 2 +- 10 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 00000000..d043512c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,45 @@ +name: Bug Report +description: File a bug report +title: "Bug Title" +labels: [bug] +assignees: + - iAmAsval +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Keep in mind that screenshots and log files help us a lot so don't forget to provide one or both of those (drag and drop files in a text area). + Your bug report will be closed without explanation if you don't follow the following rules: + - Bad bug explanation will result in bad support and probably on a negative tone + - This template shouldn't be used to ask how to use FModel or a certain feature FModel provides + - Bug reports must always use the latest FModel with the latest available version of the game you use + - If you can't load files, it's probably because of your AES key, no need to file a report + - We absolutely do not support modding + - type: input + id: game + attributes: + label: Game + placeholder: ex. Fortnite, Valorant, ... + validations: + required: true + - type: textarea + id: error + attributes: + label: Error + description: Tell us what FModel says about the error, from the console and / or the log file + placeholder: ex. [ERR] Could not export 'EditorClientAssetRegistry.bin' + render: shell + validations: + required: true + - type: textarea + id: repro + attributes: + label: Reproduction steps + description: How do you trigger this bug? Please walk us through it step by step. + placeholder: | + 1. + 2. + 3. + ... + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..4944fbd4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Discord Server + url: https://fmodel.app/discord + about: Please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 00000000..a70ea493 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,22 @@ +name: Feature Request +description: Submit a new feature request +title: "Feature Title" +labels: [suggestion] +assignees: + - iAmAsval +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! Before going any further, make sure what you're about to submit doesn't already exist. + Your feature request will be closed without explanation if you don't follow the following rules: + - This template shouldn't be used to ask how to use FModel or a certain feature FModel provides + - We absolutely do not support modding + - type: textarea + id: description + attributes: + label: Description + description: Tell us what you want FModel to be able to do + placeholder: Please describe with details and how it could be done if possible... + validations: + required: true diff --git a/CUE4Parse b/CUE4Parse index a6497422..1ac4640c 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit a64974220259487c966b6b006963b801b721d653 +Subproject commit 1ac4640cdb0ba718cf26766029c67d5375465b9d diff --git a/FModel/Constants.cs b/FModel/Constants.cs index 5d2955b7..944402ca 100644 --- a/FModel/Constants.cs +++ b/FModel/Constants.cs @@ -16,7 +16,7 @@ namespace FModel public const string BLUE = "#528BCC"; public const string DONATE_LINK = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EP9SSWG8MW4UC&source=url"; - public const string ISSUE_LINK = "https://github.com/iAmAsval/FModel/issues/new"; + public const string ISSUE_LINK = "https://github.com/iAmAsval/FModel/issues/new/choose"; public const string DISCORD_LINK = "https://discord.gg/fdkNYYQ"; public const string _FN_LIVE_TRIGGER = "fortnite-live.manifest"; diff --git a/FModel/ViewModels/AesManagerViewModel.cs b/FModel/ViewModels/AesManagerViewModel.cs index c81ca5eb..90f34e58 100644 --- a/FModel/ViewModels/AesManagerViewModel.cs +++ b/FModel/ViewModels/AesManagerViewModel.cs @@ -56,7 +56,7 @@ namespace FModel.ViewModels if (e.PropertyName != "Key" || sender is not FullyObservableCollection collection) return; - var key = FixKey(collection[e.CollectionIndex].Key); + var key = collection[e.CollectionIndex].Key = FixKey(collection[e.CollectionIndex].Key); if (e.CollectionIndex == 0) { if (!HasChange) @@ -114,7 +114,7 @@ namespace FModel.ViewModels if (key.StartsWith("0x")) key = key[2..]; - return "0x" + key.ToUpper(); + return "0x" + key.ToUpper().Trim(); } private IEnumerable EnumerateAesKeys() diff --git a/FModel/ViewModels/ApplicationViewModel.cs b/FModel/ViewModels/ApplicationViewModel.cs index 9d8ea3ec..988a3da9 100644 --- a/FModel/ViewModels/ApplicationViewModel.cs +++ b/FModel/ViewModels/ApplicationViewModel.cs @@ -47,7 +47,7 @@ namespace FModel.ViewModels IsReady = Status != EStatusKind.Loading && Status != EStatusKind.Stopping; } } - + public RightClickMenuCommand RightClickMenuCommand => _rightClickMenuCommand ??= new RightClickMenuCommand(this); private RightClickMenuCommand _rightClickMenuCommand; public MenuCommand MenuCommand => _menuCommand ??= new MenuCommand(this); @@ -56,6 +56,7 @@ namespace FModel.ViewModels private CopyCommand _copyCommand; public string TitleExtra => $"{CUE4Parse.Game.GetDescription()} ({UserSettings.Default.OverridedGame[CUE4Parse.Game]}){(Build != EBuildKind.Release ? $" ({Build})" : "")}"; + public LoadingModesViewModel LoadingModes { get; } public CustomDirectoriesViewModel CustomDirectories { get; } public CUE4ParseViewModel CUE4Parse { get; } diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 0b34bd03..6d572b4e 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -218,7 +218,7 @@ namespace FModel.ViewModels { cancellationToken.ThrowIfCancellationRequested(); // cancel if needed - var k = key.Key.Length == 66 ? key.Key : Constants.ZERO_64_CHAR; + var k = key.Key.Length == 66 ? key.Key.Trim() : Constants.ZERO_64_CHAR; Provider.SubmitKey(key.Guid, new FAesKey(k)); } @@ -481,7 +481,7 @@ namespace FModel.ViewModels } break; } - case "bin" when fileName.StartsWith("AssetRegistry"): + case "bin" when fileName.EndsWith("AssetRegistry.bin"): { TabControl.SelectedTab.Image = null; if (Provider.TryCreateReader(fullPath, out var archive)) diff --git a/FModel/ViewModels/Commands/LoadCommand.cs b/FModel/ViewModels/Commands/LoadCommand.cs index ed9bcb26..fee5fd43 100644 --- a/FModel/ViewModels/Commands/LoadCommand.cs +++ b/FModel/ViewModels/Commands/LoadCommand.cs @@ -39,12 +39,20 @@ namespace FModel.ViewModels.Commands public override async void Execute(LoadingModesViewModel contextViewModel, object parameter) { if (_applicationView.CUE4Parse.GameDirectory.HasNoFile) return; + if (_applicationView.CUE4Parse.Provider.Files.Count <= 0) + { + FLogger.AppendError(); + FLogger.AppendText("An encrypted file has been found. In order to decrypt it, please specify a working AES encryption key", Constants.WHITE, true); + return; + } + if (_applicationView.CUE4Parse.Game == FGame.FortniteGame && _applicationView.CUE4Parse.Provider.MappingsContainer == null) { FLogger.AppendError(); FLogger.AppendText("Mappings could not get pulled, extracting assets might not work properly. If so, press F12 or please restart.", Constants.WHITE, true); } + #if DEBUG var loadingTime = Stopwatch.StartNew(); #endif diff --git a/FModel/Views/About.xaml b/FModel/Views/About.xaml index d0187ebf..780a8f32 100644 --- a/FModel/Views/About.xaml +++ b/FModel/Views/About.xaml @@ -42,7 +42,7 @@ + Text="TheGameVlog ♥, Quentin ♥, Maiky ♥, HYPEX ♥, Evan, VenomLeaks, JayKey, Fevers, Netu, Laggy, s0ll, RazTracker, Mikey, kyle, Yanteh, Shiina, SexyNutella, Alexander, Jinx, Tector, imatrix, LamZykoss, Frenzy Leaks, LlamaLeaks, XTigerHyperX, FunGames, WeLoveFortnite." />