Fix extension lookup for archive infos

This commit is contained in:
KillzXGaming 2019-07-06 11:31:39 -04:00
parent f1898bcbc8
commit 32b80c0b9e
7 changed files with 9 additions and 8 deletions

Binary file not shown.

View file

@ -236,6 +236,7 @@ namespace FirstPlugin
{ ".fvmb", "bfres" },
{ ".fvbb", "bfres" },
{ ".fspb", "bfres" },
{ ".ftxb", "bntx" },
{ ".fsnb", "bfres" },
};
}

View file

@ -517,12 +517,6 @@ namespace Switch_Toolbox.Library
Extension = FindMatch(archiveFileInfo.FileData);
}
if (ArchiveFileInfo.ExtensionImageKeyLookup != null)
{
if (ArchiveFileInfo.ExtensionImageKeyLookup.ContainsKey(Extension))
SetImageKey(ArchiveFileInfo.ExtensionImageKeyLookup[Extension]);
}
switch (Extension)
{
case ".bntx": SetImageKey("bntx"); break;
@ -531,8 +525,8 @@ namespace Switch_Toolbox.Library
case ".aamp": SetImageKey("aamp"); break;
case ".bfres": SetImageKey("bfres"); break;
case ".sbfres": SetImageKey("sbfres"); break;
case ".dds":
case ".tga":
case ".dds":
case ".tga":
case ".jpg":
case ".jpeg":
case ".tiff":
@ -543,6 +537,12 @@ namespace Switch_Toolbox.Library
default: SetImageKey("fileBlank"); break;
}
if (ArchiveFileInfo.ExtensionImageKeyLookup != null)
{
if (ArchiveFileInfo.ExtensionImageKeyLookup.ContainsKey(Extension))
SetImageKey(ArchiveFileInfo.ExtensionImageKeyLookup[Extension]);
}
}
private void SetImageKey(string Key) {