diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 07601301..3c80f9bc 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 0cc1c667..03a43615 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 43b97cac..b2c55766 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/SizeTables/TPFileSizeTable.cs b/Switch_FileFormatsMain/FileFormats/SizeTables/TPFileSizeTable.cs index 67551ce4..9cf0c24b 100644 --- a/Switch_FileFormatsMain/FileFormats/SizeTables/TPFileSizeTable.cs +++ b/Switch_FileFormatsMain/FileFormats/SizeTables/TPFileSizeTable.cs @@ -78,7 +78,7 @@ namespace FirstPlugin public bool TrySetSize(string Path, uint DecompSize, uint CompSize, Dictionary<string, uint> ArchiveFiles = null) { - string RelativePath = Path.Replace(Runtime.TpGamePath, ""); + string RelativePath = Path.Replace(Runtime.TpGamePath, string.Empty); if (FileSizes.ContainsKey(RelativePath)) { @@ -86,6 +86,8 @@ namespace FirstPlugin FileSizes[RelativePath] = CompSize; else FileSizes[RelativePath] = DecompSize; + + return true; } return false; diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index bebbc50d..2803c5a1 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index d395bb91..5f8faeba 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs b/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs index 34ce3527..07456958 100644 --- a/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs +++ b/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs @@ -46,7 +46,7 @@ namespace Switch_Toolbox.Library return STMath.GetFileSize(FileData.Length, 4); } - IFileFormat FileFormat = null; //Format attached for saving + public IFileFormat FileFormat = null; //Format attached for saving protected byte[] _fileData = null; @@ -56,7 +56,10 @@ namespace Switch_Toolbox.Library { get { - return _fileData; + if (FileFormat != null && FileFormat.CanSave) + return FileFormat.Save(); + else + return _fileData; } set { _fileData = value; } } @@ -265,6 +268,7 @@ namespace Switch_Toolbox.Library public override void OnDoubleMouseClick(TreeView treeview) { TreeNode node = STFileLoader.GetNodeFileFormat(Text, ArchiveFileInfo.FileData, true, this); + ArchiveFileInfo.FileFormat = (IFileFormat)node; if (node != null) ReplaceNode(this.Parent, this, node); }