From afb02f5bbd8d0d94fe47e171a61cd51ee2ffeb73 Mon Sep 17 00:00:00 2001 From: LongerWarrior Date: Tue, 12 May 2026 01:22:46 +0300 Subject: [PATCH] Directive 8020, Conan Exiles Enhanced, Chasing Kaleido RIDER, Abzu support Fix Delta Force, Highguard SM jmap as mappings support --- CUE4Parse | 2 +- FModel/Settings/UserSettings.cs | 2 +- FModel/ViewModels/CUE4ParseViewModel.cs | 18 ++++++++++++++---- .../Resources/Controls/DropOverlay.xaml.cs | 7 ++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 81458ae7..dc70cfbc 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 81458ae77d3f3230d7582a77ffd938510430a4bf +Subproject commit dc70cfbc92436bd8c6308a5139c1baa94bd37799 diff --git a/FModel/Settings/UserSettings.cs b/FModel/Settings/UserSettings.cs index ea62298c..42991de9 100644 --- a/FModel/Settings/UserSettings.cs +++ b/FModel/Settings/UserSettings.cs @@ -300,7 +300,7 @@ namespace FModel.Settings } } - private EUnluacFlags _unluacFlags; + private EUnluacFlags _unluacFlags = EUnluacFlags.Decompile; public EUnluacFlags UnluacFlags { get => _unluacFlags; diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index a4363437..565a672e 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -400,6 +400,16 @@ public class CUE4ParseViewModel : ViewModel }); } + private ITypeMappingsProvider SelectMappingsProvider(string path) + { + if (path.EndsWith(".jmap.gz", StringComparison.OrdinalIgnoreCase) || path.EndsWith(".jmap", StringComparison.OrdinalIgnoreCase)) + { + return new JmapTypeMappingsProvider(path); + } + + return new FileUsmapTypeMappingsProvider(path); + } + public Task InitMappings(bool force = false) { if (!UserSettings.IsEndpointValid(EEndpointType.Mapping, out var endpoint)) @@ -413,7 +423,7 @@ public class CUE4ParseViewModel : ViewModel var l = ELog.Information; if (endpoint.Overwrite && File.Exists(endpoint.FilePath)) { - Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(endpoint.FilePath); + Provider.MappingsContainer = SelectMappingsProvider(endpoint.FilePath); } else if (endpoint.IsValid) { @@ -439,7 +449,7 @@ public class CUE4ParseViewModel : ViewModel _apiEndpointView.DownloadFile(mapping.Url, mappingPath); } - Provider.MappingsContainer = new FileUsmapTypeMappingsProvider(mappingPath); + Provider.MappingsContainer = SelectMappingsProvider(mappingPath); break; } } @@ -1321,8 +1331,8 @@ public class CUE4ParseViewModel : ViewModel { var data = squareEnixObject switch { - USQEXSEADSoundBank sqexSoundBank => sqexSoundBank.SQEXSoundBankData?.Data ?? [], - USQEXSEADSound sqexSound => sqexSound.SQEXSoundData?.Data ?? [], + USQEXSEADSoundBank sqexSoundBank => sqexSoundBank.SQEXSoundBankData?.ReadDataOnce() ?? [], + USQEXSEADSound sqexSound => sqexSound.SQEXSoundData?.ReadDataOnce() ?? [], _ => [], }; var sabPath = Path.Combine(TabControl.SelectedTab.Entry.PathWithoutExtension.Replace('\\', '/').SubstringBeforeLast('/'), squareEnixObject.Name); diff --git a/FModel/Views/Resources/Controls/DropOverlay.xaml.cs b/FModel/Views/Resources/Controls/DropOverlay.xaml.cs index ec6d4ca4..faacc412 100644 --- a/FModel/Views/Resources/Controls/DropOverlay.xaml.cs +++ b/FModel/Views/Resources/Controls/DropOverlay.xaml.cs @@ -68,7 +68,7 @@ public partial class DropOverlay : UserControl } else if (_dragStatus is DragStatus.File) { - TitleText.Text = "Drop .usmap to import"; + TitleText.Text = "Drop usmap/jmap to import"; DescriptionText.Text = "Mapping file will be applied immediately"; } } @@ -125,7 +125,6 @@ public partial class DropOverlay : UserControl if (!_applicationView.Status.IsReady || !e.Data.GetDataPresent(DataFormats.FileDrop) || e.Data.GetData(DataFormats.FileDrop) is not string[] files) return; - bool directorySelectorIsVisible = _applicationView.Status.Kind is EStatusKind.Configuring; if (!directorySelectorIsVisible && (Helper.IsWindowOpen() || Helper.IsWindowOpen())) { @@ -145,7 +144,9 @@ public partial class DropOverlay : UserControl _dragStatus = DragStatus.Folder; return; } - else if (File.Exists(path) && Path.GetExtension(path).Equals(".usmap", StringComparison.OrdinalIgnoreCase)) + else if (File.Exists(path) && path.EndsWith(".usmap", StringComparison.OrdinalIgnoreCase) || + path.EndsWith(".jmap", StringComparison.OrdinalIgnoreCase) || + path.EndsWith(".jmap.gz", StringComparison.OrdinalIgnoreCase)) { _path = path; _dragStatus = DragStatus.File;