2021-09-27 12:42:46 +00:00
|
|
|
using System;
|
|
|
|
using Wabbajack.DTOs.JsonConverters;
|
|
|
|
using Wabbajack.Paths;
|
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
namespace Wabbajack.DTOs;
|
|
|
|
|
|
|
|
[JsonName("ModList")]
|
|
|
|
public class ModList
|
2021-09-27 12:42:46 +00:00
|
|
|
{
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Archives required by this modlist
|
|
|
|
/// </summary>
|
|
|
|
public Archive[] Archives { get; set; } = Array.Empty<Archive>();
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Author of the ModList
|
|
|
|
/// </summary>
|
|
|
|
public string Author { get; set; } = string.Empty;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Description of the ModList
|
|
|
|
/// </summary>
|
|
|
|
public string Description { get; set; } = string.Empty;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Install directives
|
|
|
|
/// </summary>
|
|
|
|
public Directive[] Directives { get; set; } = Array.Empty<Directive>();
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The game variant to which this game applies
|
|
|
|
/// </summary>
|
|
|
|
public Game GameType { get; set; }
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Hash of the banner-image
|
|
|
|
/// </summary>
|
|
|
|
public RelativePath Image { get; set; }
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Name of the ModList
|
|
|
|
/// </summary>
|
|
|
|
public string Name { get; set; } = string.Empty;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// URL to the readme
|
|
|
|
/// </summary>
|
|
|
|
public string Readme { get; set; } = string.Empty;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The build version of Wabbajack used when compiling the Modlist
|
|
|
|
/// </summary>
|
|
|
|
public Version? WabbajackVersion { get; set; }
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Website of the ModList
|
|
|
|
/// </summary>
|
|
|
|
public Uri? Website { get; set; }
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Current Version of the Modlist
|
|
|
|
/// </summary>
|
|
|
|
public Version Version { get; set; } = new(1, 0, 0, 0);
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Whether the Modlist is NSFW or not
|
|
|
|
/// </summary>
|
|
|
|
public bool IsNSFW { get; set; }
|
2021-11-10 23:13:02 +00:00
|
|
|
|
|
|
|
public ModList Strip()
|
|
|
|
{
|
|
|
|
return new ModList
|
|
|
|
{
|
|
|
|
Author = Author,
|
|
|
|
Description = Description,
|
|
|
|
GameType = GameType,
|
|
|
|
Name = Name,
|
|
|
|
Readme = Readme,
|
|
|
|
WabbajackVersion = WabbajackVersion,
|
|
|
|
Website = Website,
|
|
|
|
Version = Version,
|
|
|
|
IsNSFW = IsNSFW,
|
|
|
|
};
|
|
|
|
}
|
2021-09-27 12:42:46 +00:00
|
|
|
}
|