mirror of
https://github.com/4sval/FModel.git
synced 2026-04-05 00:26:17 -05:00
Virtual path stuff
This commit is contained in:
parent
80c9a27e10
commit
3947a4a5d8
|
|
@ -1 +1 @@
|
|||
Subproject commit 8e6e2ce8e73b191d3ec4778998368c1ab46ea6cd
|
||||
Subproject commit ed78044b52621127b353871464af889258de3ef9
|
||||
|
|
@ -63,6 +63,7 @@ namespace FModel.ViewModels
|
|||
public SearchViewModel SearchVm { get; }
|
||||
public TabControlViewModel TabControl { get; }
|
||||
public int LocalizedResourcesCount { get; set; }
|
||||
public int VirtualPathCount { get; set; }
|
||||
|
||||
public CUE4ParseViewModel(string gameDirectory)
|
||||
{
|
||||
|
|
@ -337,6 +338,27 @@ namespace FModel.ViewModels
|
|||
});
|
||||
}
|
||||
|
||||
public async Task LoadVirtualPaths()
|
||||
{
|
||||
if (VirtualPathCount > 0) return;
|
||||
await _threadWorkerView.Begin(cancellationToken =>
|
||||
{
|
||||
VirtualPathCount = Provider.LoadVirtualPaths(cancellationToken);
|
||||
#if DEBUG
|
||||
if (VirtualPathCount > 0)
|
||||
{
|
||||
FLogger.AppendInformation();
|
||||
FLogger.AppendText($"{VirtualPathCount} virtual paths loaded!", Constants.WHITE, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
FLogger.AppendError();
|
||||
FLogger.AppendText("Could not load virtual paths, plugin manifest may not exist", Constants.WHITE, true);
|
||||
}
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
public void ExtractFolder(CancellationToken cancellationToken, TreeItem folder)
|
||||
{
|
||||
foreach (var asset in folder.AssetsList.Assets)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace FModel.ViewModels.Commands
|
|||
MainWindow.YesWeCats.LeftTabControl.SelectedIndex = 1; // folders tab
|
||||
|
||||
await _applicationView.CUE4Parse.LoadLocalizedResources(); // load locres if not already loaded
|
||||
await _applicationView.CUE4Parse.LoadVirtualPaths(); // load virtual paths if not already loaded
|
||||
Helper.CloseWindow<AdonisWindow>("Search View"); // close search window if opened
|
||||
|
||||
await _threadWorkerView.Begin(async cancellationToken =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user