implemented external storage of resource schemes.

This commit is contained in:
morkt
2015-09-18 01:27:53 +04:00
parent eef86f0804
commit 9a8bff184d
32 changed files with 478 additions and 1431 deletions

View File

@@ -56,6 +56,12 @@ namespace GameRes.Formats.NScripter
public string Password { get; set; }
}
[Serializable]
public class NsaScheme : ResourceScheme
{
public Dictionary<string, string> KnownKeys;
}
public enum Compression
{
Unknown = 256,
@@ -70,19 +76,19 @@ namespace GameRes.Formats.NScripter
{
public override string Tag { get { return "NSA"; } }
public static readonly Dictionary<string, string> KnownKeys = new Dictionary<string, string>()
{
{ "Kimi ga Aruji de Shitsuji ga Ore de",
"kopkl;fdsl;kl;mwekopj@pgfd[p;:kl:;,lwret;kl;kolsgfdio@pdsflkl:,rse;:l,;:lpksdfpo" },
{ "Kiss yori Amakute Fukai Mono",
"dfklmdsgkmlkmljklgfnlsdfnklsdfjkl;sdfmkldfskfsdmklsdfjklfdsjklsdfsdfl;" },
};
public NsaOpener ()
{
Extensions = new string[] { "nsa", "dat" };
}
public static Dictionary<string, string> KnownKeys = new Dictionary<string, string>();
public override ResourceScheme Scheme
{
get { return new NsaScheme { KnownKeys = KnownKeys }; }
set { KnownKeys = ((NsaScheme)value).KnownKeys; }
}
public override ArcFile TryOpen (ArcView file)
{
List<Entry> dir = null;