2020-04-16 15:54:26 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2020-02-01 12:13:12 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using Wabbajack.Common;
|
2020-04-06 20:48:54 +00:00
|
|
|
|
using Wabbajack.Common.Serialization.Json;
|
2020-02-01 12:13:12 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Lib
|
|
|
|
|
{
|
2020-04-06 20:48:54 +00:00
|
|
|
|
[JsonName("Manifest")]
|
2020-02-01 12:13:12 +00:00
|
|
|
|
public class Manifest
|
|
|
|
|
{
|
|
|
|
|
public string Name;
|
2020-04-16 15:54:26 +00:00
|
|
|
|
public Version Version;
|
2020-02-01 12:13:12 +00:00
|
|
|
|
public string Author;
|
|
|
|
|
public string Description;
|
|
|
|
|
|
|
|
|
|
public Game GameType;
|
|
|
|
|
// Enum toString for better parsing in other software
|
|
|
|
|
public string GameName;
|
|
|
|
|
|
|
|
|
|
public ModManager ModManager;
|
|
|
|
|
// Enum toString for better parsing in other software
|
|
|
|
|
public string ModManagerName;
|
|
|
|
|
|
|
|
|
|
public long DownloadSize;
|
|
|
|
|
public long InstallSize;
|
|
|
|
|
|
|
|
|
|
public List<Archive> Archives;
|
|
|
|
|
|
|
|
|
|
public Manifest(ModList modlist)
|
|
|
|
|
{
|
|
|
|
|
Name = modlist.Name;
|
2020-04-16 15:54:26 +00:00
|
|
|
|
Version = modlist.Version;
|
2020-02-01 12:13:12 +00:00
|
|
|
|
Author = modlist.Author;
|
|
|
|
|
Description = modlist.Description;
|
|
|
|
|
|
|
|
|
|
GameType = modlist.GameType;
|
|
|
|
|
GameName = GameType.ToString();
|
|
|
|
|
|
|
|
|
|
ModManager = modlist.ModManager;
|
|
|
|
|
ModManagerName = ModManager.ToString();
|
|
|
|
|
|
|
|
|
|
DownloadSize = modlist.DownloadSize;
|
|
|
|
|
InstallSize = modlist.InstallSize;
|
|
|
|
|
|
|
|
|
|
// meta is being omitted due to it being useless and not very space friendly
|
2020-04-10 01:29:53 +00:00
|
|
|
|
Archives = modlist.Archives.Select(a => new Archive(a.State)
|
2020-02-01 12:13:12 +00:00
|
|
|
|
{
|
|
|
|
|
Hash = a.Hash,
|
|
|
|
|
Name = a.Name,
|
|
|
|
|
Size = a.Size,
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|