diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 2dc378b3..75cc1200 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 1cb1b21c..5765caa5 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index ea8f4352..9cd7a58a 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs b/Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs index bee22deb..f4b16b37 100644 --- a/Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs +++ b/Switch_FileFormatsMain/FileFormats/Hashes/SAHT.cs @@ -5,13 +5,17 @@ using System.Text; using System.Threading.Tasks; using Switch_Toolbox.Library.IO; using Syroot.BinaryData; +using System.IO; namespace FirstPlugin { public class SAHT { - public SAHT(string FileName) { - Read(new FileReader(FileName)); + public string FileName { get; set; } + + public SAHT(string fileName) { + FileName = fileName; + Read(new FileReader(fileName)); } public List HashEntries = new List(); @@ -32,10 +36,19 @@ namespace FirstPlugin HashEntries.Add(entry); } + ToTextFile(); + } + + public void ToTextFile() + { + StringWriter writer = new StringWriter(); + foreach (var entry in HashEntries) { - Console.WriteLine(entry.Hash + " " + entry.Name); + writer.WriteLine($"{entry.Name}={entry.Hash.ToString("x")}"); } + + File.WriteAllText(FileName + ".txt", writer.ToString()); } public class HashEntry diff --git a/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.cs b/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.cs index 8af57ec7..faa31b43 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.cs @@ -184,11 +184,18 @@ namespace FirstPlugin } string ValueText = (k == null ? "" : k.ToString()); + string ValueTypeString = ""; - Type ValueType = k.GetType(); + if (k == null) + ValueTypeString = "NULL"; + else + { + Type ValueType = k.GetType(); + ValueTypeString = ValueType.ToString(); + } ListViewItem item = new ListViewItem(ValueText); - item.SubItems.Add(ValueType.ToString()); + item.SubItems.Add(ValueTypeString); item.SubItems.Add(ValueText); listViewCustom1.Items.Add(item); diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index ac157cb4..741b8d7e 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ