mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Created CerasConfig with KnownTypes
This commit is contained in:
parent
4c694eafc9
commit
df3d6b4179
27
Wabbajack.Lib/CerasConfig.cs
Normal file
27
Wabbajack.Lib/CerasConfig.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Ceras;
|
||||
using Compression.BSA;
|
||||
using VFS;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib.Downloaders;
|
||||
|
||||
namespace Wabbajack.Lib
|
||||
{
|
||||
public class CerasConfig
|
||||
{
|
||||
public static SerializerConfig Config = new SerializerConfig()
|
||||
{
|
||||
KnownTypes =
|
||||
{
|
||||
typeof(ModList), typeof(Game), typeof(Directive), typeof(IgnoredDirectly),
|
||||
typeof(NoMatch), typeof(InlineFile), typeof(PropertyType), typeof(CleanedESM),
|
||||
typeof(RemappedInlineFile), typeof(FromArchive), typeof(CreateBSA), typeof(PatchedFromArchive),
|
||||
typeof(SourcePatch), typeof(MergedPatch), typeof(Archive), typeof(IndexedArchive), typeof(IndexedEntry),
|
||||
typeof(IndexedArchiveEntry), typeof(BSAIndexedEntry), typeof(VirtualFile),
|
||||
typeof(ArchiveStateObject), typeof(FileStateObject), typeof(IDownloader),
|
||||
typeof(IUrlDownloader), typeof(AbstractDownloadState), typeof(ManualDownloader),
|
||||
typeof(DropboxDownloader), typeof(GoogleDriveDownloader), typeof(HTTPDownloader),
|
||||
typeof(MegaDownloader), typeof(ModDBDownloader), typeof(NexusDownloader)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -305,7 +305,7 @@ namespace Wabbajack.Lib
|
||||
Utils.Log($"Exporting Modlist to : {ModListOutputFile}");
|
||||
|
||||
//ModList.ToJSON(Path.Combine(ModListOutputFolder, "modlist.json"));
|
||||
ModList.ToCERAS(Path.Combine(ModListOutputFolder, "modlist"));
|
||||
ModList.ToCERAS(Path.Combine(ModListOutputFolder, "modlist"), ref CerasConfig.Config);
|
||||
|
||||
if (File.Exists(ModListOutputFile))
|
||||
File.Delete(ModListOutputFile);
|
||||
|
@ -87,7 +87,7 @@ namespace Wabbajack.Lib
|
||||
var entry = ar.GetEntry("modlist");
|
||||
using (var e = entry.Open())
|
||||
//return e.FromJSON<ModList>();
|
||||
return e.FromCERAS<ModList>();
|
||||
return e.FromCERAS<ModList>(ref CerasConfig.Config);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CerasConfig.cs" />
|
||||
<Compile Include="Compiler.cs" />
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="Downloaders\AbstractDownloadState.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user