1
0
mirror of synced 2024-12-11 07:16:05 +01:00

Automatically open sarc file entries if there is only a single file in them

This commit is contained in:
KillzXGaming 2020-04-19 13:28:04 -04:00
parent a3be9b111d
commit 11099d88df

View File

@ -110,7 +110,7 @@ namespace FirstPlugin
sarc.sarcData.Files = new Dictionary<string, byte[]>(); sarc.sarcData.Files = new Dictionary<string, byte[]>();
if (IsBigEndian) if (IsBigEndian)
sarc.sarcData.endianness = Syroot.BinaryData.ByteOrder.BigEndian; sarc.sarcData.endianness = Syroot.BinaryData.ByteOrder.BigEndian;
else else
sarc.sarcData.endianness = Syroot.BinaryData.ByteOrder.LittleEndian; sarc.sarcData.endianness = Syroot.BinaryData.ByteOrder.LittleEndian;
} }
@ -142,6 +142,9 @@ namespace FirstPlugin
var entry = SetupFileEntry(fileName, file.Value, Hash); var entry = SetupFileEntry(fileName, file.Value, Hash);
files.Add(entry); files.Add(entry);
FileLookup.Add(fileName, entry); FileLookup.Add(fileName, entry);
if (SzsFiles.Files.Count == 1)
entry.OpenFileFormatOnLoad = true;
} }
sarcData.Files.Clear(); sarcData.Files.Clear();