mirror of
https://github.com/4sval/FModel.git
synced 2026-09-14 20:46:45 -05:00
Virtual path stuff
This commit is contained in:
Submodule CUE4Parse updated: 8e6e2ce8e7...ed78044b52
@@ -63,6 +63,7 @@ namespace FModel.ViewModels
|
|||||||
public SearchViewModel SearchVm { get; }
|
public SearchViewModel SearchVm { get; }
|
||||||
public TabControlViewModel TabControl { get; }
|
public TabControlViewModel TabControl { get; }
|
||||||
public int LocalizedResourcesCount { get; set; }
|
public int LocalizedResourcesCount { get; set; }
|
||||||
|
public int VirtualPathCount { get; set; }
|
||||||
|
|
||||||
public CUE4ParseViewModel(string gameDirectory)
|
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)
|
public void ExtractFolder(CancellationToken cancellationToken, TreeItem folder)
|
||||||
{
|
{
|
||||||
foreach (var asset in folder.AssetsList.Assets)
|
foreach (var asset in folder.AssetsList.Assets)
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ namespace FModel.ViewModels.Commands
|
|||||||
MainWindow.YesWeCats.LeftTabControl.SelectedIndex = 1; // folders tab
|
MainWindow.YesWeCats.LeftTabControl.SelectedIndex = 1; // folders tab
|
||||||
|
|
||||||
await _applicationView.CUE4Parse.LoadLocalizedResources(); // load locres if not already loaded
|
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
|
Helper.CloseWindow<AdonisWindow>("Search View"); // close search window if opened
|
||||||
|
|
||||||
await _threadWorkerView.Begin(async cancellationToken =>
|
await _threadWorkerView.Begin(async cancellationToken =>
|
||||||
|
|||||||
Reference in New Issue
Block a user