Fortnite InstalledBundles

This commit is contained in:
MountainFlash
2022-04-30 16:25:22 +05:30
parent e2523b4a80
commit b319d9d89e
3 changed files with 24 additions and 3 deletions

View File

@@ -118,6 +118,13 @@ namespace FModel.ViewModels
SearchOption.AllDirectories, true, versions); SearchOption.AllDirectories, true, versions);
break; break;
} }
case FGame.FortniteGame:
Provider = new DefaultFileProvider(new DirectoryInfo(gameDirectory), new List<DirectoryInfo>
{
new(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\FortniteGame\\Saved\\PersistentDownloadDir\\InstalledBundles"),
},
SearchOption.AllDirectories, true, versions);
break;
case FGame.Unknown when UserSettings.Default.ManualGames.TryGetValue(gameDirectory, out var settings): case FGame.Unknown when UserSettings.Default.ManualGames.TryGetValue(gameDirectory, out var settings):
{ {
versions = new VersionContainer(settings.OverridedGame, UserSettings.Default.OverridedPlatform, versions = new VersionContainer(settings.OverridedGame, UserSettings.Default.OverridedPlatform,
@@ -769,7 +776,14 @@ namespace FModel.ViewModels
private void SaveExport(UObject export) private void SaveExport(UObject export)
{ {
var toSave = new Exporter(export, UserSettings.Default.TextureExportFormat, UserSettings.Default.LodExportFormat, UserSettings.Default.MeshExportFormat, UserSettings.Default.OverridedPlatform); var exportOptions = new ExporterOptions()
{
TextureFormat = UserSettings.Default.TextureExportFormat,
LodFormat = UserSettings.Default.LodExportFormat,
MeshFormat = UserSettings.Default.MeshExportFormat,
Platform = UserSettings.Default.OverridedPlatform
};
var toSave = new Exporter(export, exportOptions);
var toSaveDirectory = new DirectoryInfo(UserSettings.Default.ModelDirectory); var toSaveDirectory = new DirectoryInfo(UserSettings.Default.ModelDirectory);
if (toSave.TryWriteToDir(toSaveDirectory, out var savedFileName)) if (toSave.TryWriteToDir(toSaveDirectory, out var savedFileName))
{ {

View File

@@ -184,9 +184,16 @@ namespace FModel.ViewModels
await _threadWorkerView.Begin(_ => await _threadWorkerView.Begin(_ =>
{ {
var exportOptions = new CUE4Parse_Conversion.ExporterOptions()
{
TextureFormat = UserSettings.Default.TextureExportFormat,
LodFormat = UserSettings.Default.LodExportFormat,
MeshFormat = UserSettings.Default.MeshExportFormat,
Platform = UserSettings.Default.OverridedPlatform
};
foreach (var model in _loadedModels) foreach (var model in _loadedModels)
{ {
var toSave = new CUE4Parse_Conversion.Exporter(model.Export, UserSettings.Default.TextureExportFormat, UserSettings.Default.LodExportFormat, UserSettings.Default.MeshExportFormat, UserSettings.Default.OverridedPlatform); var toSave = new CUE4Parse_Conversion.Exporter(model.Export, exportOptions);
if (toSave.TryWriteToDir(new DirectoryInfo(folderBrowser.SelectedPath), out var savedFileName)) if (toSave.TryWriteToDir(new DirectoryInfo(folderBrowser.SelectedPath), out var savedFileName))
{ {
Log.Information("Successfully saved {FileName}", savedFileName); Log.Information("Successfully saved {FileName}", savedFileName);