Created new Directives

This commit is contained in:
erri120 2019-12-02 17:43:43 +01:00
parent f4b3ba9a72
commit 4a3b5d8161
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
3 changed files with 19 additions and 2 deletions

View File

@ -23,7 +23,7 @@ namespace Wabbajack.Lib
typeof(MegaDownloader.State), typeof(ModDBDownloader.State), typeof(NexusDownloader.State),
typeof(BSAStateObject), typeof(BSAFileStateObject), typeof(BA2StateObject), typeof(BA2DX10EntryState),
typeof(BA2FileEntryState), typeof(MediaFireDownloader.State), typeof(ArchiveMeta),
typeof(PropertyFile)
typeof(PropertyFile), typeof(SteamMeta), typeof(SteamWorkshopDownloader), typeof(SteamWorkshopDownloader.State)
}
};

View File

@ -169,6 +169,15 @@ namespace Wabbajack.Lib
{
}
public class SteamMeta : ArchiveMeta
{
public int ItemID;
/// <summary>
/// Size is in bytes
/// </summary>
public int Size;
}
[MemberConfig(TargetMember.All)]
public class FromArchive : Directive
{

View File

@ -73,6 +73,14 @@ namespace Wabbajack.Lib
NoWrapText($" * Size : {archive.Size.ToFileSizeString()}");
NoWrapText($" * SHA256 : [{hash}](https://www.virustotal.com/gui/file/{hash})");
}
lst.Directives.Where(d => d is SteamMeta).Do(f =>
{
if (f is SteamMeta s)
{
var link = $"https://steamcommunity.com/sharedfiles/filedetails/?id={s.ItemID}";
NoWrapText($"* Steam Workshop Item: [{s.ItemID}]({link}) | Size: {s.Size}");
}
});
Text("\n\n");
var patched = lst.Directives.OfType<PatchedFromArchive>().OrderBy(p => p.To).ToList();
@ -134,4 +142,4 @@ namespace Wabbajack.Lib
return lstArchives.OrderByDescending(a => a.Size);
}
}
}
}