mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added IsNSFW for modlists
This commit is contained in:
parent
9b71e1b644
commit
0d07319ac8
@ -18,6 +18,7 @@ namespace Wabbajack.Lib
|
||||
public string? ModListName, ModListAuthor, ModListDescription, ModListWebsite, ModlistReadme;
|
||||
public Version? ModlistVersion;
|
||||
public AbsolutePath ModListImage;
|
||||
public bool ModlistIsNSFW;
|
||||
protected Version? WabbajackVersion;
|
||||
|
||||
public abstract AbsolutePath VFSCacheName { get; }
|
||||
|
@ -108,6 +108,11 @@ namespace Wabbajack.Lib
|
||||
/// </summary>
|
||||
public Version Version = new Version(1, 0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the Modlist is NSFW or not
|
||||
/// </summary>
|
||||
public bool IsNSFW;
|
||||
|
||||
/// <summary>
|
||||
/// The size of all the archives once they're downloaded
|
||||
/// </summary>
|
||||
|
@ -303,7 +303,8 @@ namespace Wabbajack.Lib
|
||||
Description = ModListDescription ?? "",
|
||||
Readme = ModlistReadme ?? "",
|
||||
Image = ModListImage != default ? ModListImage.FileName : default,
|
||||
Website = ModListWebsite != null ? new Uri(ModListWebsite) : null
|
||||
Website = !string.IsNullOrWhiteSpace(ModListWebsite) ? new Uri(ModListWebsite) : null,
|
||||
IsNSFW = ModlistIsNSFW
|
||||
};
|
||||
|
||||
UpdateTracker.NextStep("Running Validation");
|
||||
|
@ -130,6 +130,7 @@ namespace Wabbajack
|
||||
public string Description { get; set; }
|
||||
public string Website { get; set; }
|
||||
public string Readme { get; set; }
|
||||
public bool IsNSFW { get; set; }
|
||||
public AbsolutePath SplashScreen { get; set; }
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ namespace Wabbajack
|
||||
[Reactive]
|
||||
public string VersionText { get; set; }
|
||||
|
||||
private ObservableAsPropertyHelper<Version> _version;
|
||||
private readonly ObservableAsPropertyHelper<Version> _version;
|
||||
public Version Version => _version.Value;
|
||||
|
||||
[Reactive]
|
||||
@ -37,6 +37,9 @@ namespace Wabbajack
|
||||
[Reactive]
|
||||
public string Website { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool IsNSFW { get; set; }
|
||||
|
||||
public IObservable<bool> InError { get; }
|
||||
|
||||
public ModlistSettingsEditorVM(CompilationModlistSettings settings)
|
||||
@ -81,6 +84,7 @@ namespace Wabbajack
|
||||
ImagePath.TargetPath = _settings.SplashScreen;
|
||||
Website = _settings.Website;
|
||||
VersionText = _settings.Version;
|
||||
IsNSFW = _settings.IsNSFW;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
@ -92,6 +96,7 @@ namespace Wabbajack
|
||||
_settings.Readme = Readme;
|
||||
_settings.SplashScreen = ImagePath.TargetPath;
|
||||
_settings.Website = Website;
|
||||
_settings.IsNSFW = IsNSFW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ namespace Wabbajack
|
||||
public Uri Website => SourceModList?.Website;
|
||||
public ModManager ModManager => SourceModList?.ModManager ?? ModManager.MO2;
|
||||
public Version Version => SourceModList?.Version;
|
||||
public bool IsNSFW => SourceModList?.IsNSFW ?? false;
|
||||
|
||||
// Image isn't exposed as a direct property, but as an observable.
|
||||
// This acts as a caching mechanism, as interested parties will trigger it to be created,
|
||||
|
@ -147,6 +147,11 @@
|
||||
Text="Readme"
|
||||
ToolTip="Link to the Readme." />
|
||||
<TextBox x:Name="ReadmeSetting" Style="{StaticResource ValueStyle}"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0 6 0 0">
|
||||
<TextBlock>NSFW:</TextBlock>
|
||||
<CheckBox x:Name="NSFWSetting" Margin="8 1 0 0"
|
||||
ToolTip="Select this if your Modlist has adult themed content such as SexLab or other mods involving sexual acts. Nude body replacer do not fall under this category neither do slutty outfits or gore."/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<Border
|
||||
|
@ -61,20 +61,22 @@ namespace Wabbajack
|
||||
.Select(x => !x)
|
||||
.BindToStrict(this, x => x.SettingsScrollViewer.IsEnabled)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(this.ViewModel, x => x.CurrentModlistSettings.ModListName, x => x.ModListNameSetting.Text)
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.ModListName, x => x.ModListNameSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.VersionText, x => x.VersionSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(this.ViewModel, x => x.CurrentModlistSettings.AuthorText, x => x.AuthorNameSetting.Text)
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.AuthorText, x => x.AuthorNameSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(this.ViewModel, x => x.CurrentModlistSettings.Description, x => x.DescriptionSetting.Text)
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.Description, x => x.DescriptionSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.WhenAny(x => x.ViewModel.CurrentModlistSettings.ImagePath)
|
||||
.BindToStrict(this, x => x.ImageFilePicker.PickerVM)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(this.ViewModel, x => x.CurrentModlistSettings.Website, x => x.WebsiteSetting.Text)
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.Website, x => x.WebsiteSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(this.ViewModel, x => x.CurrentModlistSettings.Readme, x => x.ReadmeSetting.Text)
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.Readme, x => x.ReadmeSetting.Text)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(ViewModel, x => x.CurrentModlistSettings.IsNSFW, x => x.NSFWSetting.IsChecked)
|
||||
.DisposeWith(dispose);
|
||||
|
||||
// Bottom Compiler Settings
|
||||
|
Loading…
Reference in New Issue
Block a user