sleeping makes you clever

This commit is contained in:
4sval
2022-08-06 12:08:17 +02:00
parent 516fa33f93
commit e2a5a6af60
7 changed files with 45 additions and 115 deletions

View File

@@ -295,7 +295,7 @@ public class CUE4ParseViewModel : ViewModel
{
// game directory dependent, we don't have the provider game name yet since we don't have aes keys
// except when this comes from the AES Manager
if (!UserSettings.TryGetGameCustomEndpoint(Game, EEndpointType.Aes, out var endpoint))
if (!UserSettings.IsEndpointEnabled(Game, EEndpointType.Aes, out var endpoint))
return;
await _threadWorkerView.Begin(cancellationToken =>
@@ -323,7 +323,7 @@ public class CUE4ParseViewModel : ViewModel
public async Task InitBenMappings()
{
if (!UserSettings.TryGetGameCustomEndpoint(Game, EEndpointType.Mapping, out var endpoint))
if (!UserSettings.IsEndpointEnabled(Game, EEndpointType.Mapping, out var endpoint))
return;
await _threadWorkerView.Begin(cancellationToken =>

View File

@@ -68,6 +68,20 @@ public class SettingsViewModel : ViewModel
set => SetProperty(ref _selectedOptions, value);
}
private FEndpoint _aesEndpoint;
public FEndpoint AesEndpoint
{
get => _aesEndpoint;
set => SetProperty(ref _aesEndpoint, value);
}
private FEndpoint _mappingEndpoint;
public FEndpoint MappingEndpoint
{
get => _mappingEndpoint;
set => SetProperty(ref _mappingEndpoint, value);
}
private ELanguage _selectedAssetLanguage;
public ELanguage SelectedAssetLanguage
{
@@ -96,13 +110,6 @@ public class SettingsViewModel : ViewModel
set => SetProperty(ref _selectedCompressedAudio, value);
}
private string _currentMappingFile;
public string CurrentMappingFile // only used so that it updates the UI
{
get => _currentMappingFile;
set => SetProperty(ref _currentMappingFile, value);
}
private EIconStyle _selectedCosmeticStyle;
public EIconStyle SelectedCosmeticStyle
{
@@ -198,8 +205,11 @@ public class SettingsViewModel : ViewModel
_optionsSnapshot = UserSettings.Default.OverridedOptions[_game];
}
if (UserSettings.TryGetGameCustomEndpoint(_game, EEndpointType.Mapping, out var endpoint))
CurrentMappingFile = endpoint.Path;
if (UserSettings.Default.CustomEndpoints.TryGetValue(_game, out var endpoints))
{
AesEndpoint = endpoints[0];
MappingEndpoint = endpoints[1];
}
_assetLanguageSnapshot = UserSettings.Default.AssetLanguage;
_compressedAudioSnapshot = UserSettings.Default.CompressedAudioMode;