From 3e9624c500a8d7a5a833615a0285639ae24b5edd Mon Sep 17 00:00:00 2001 From: Nifyr Date: Sun, 13 Mar 2022 17:03:37 +0100 Subject: [PATCH] Bug fix regarding audio exporting --- FileManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FileManager.cs b/FileManager.cs index 733ff41..0edf68a 100644 --- a/FileManager.cs +++ b/FileManager.cs @@ -296,6 +296,9 @@ public byte[] GetDelphisMainBuffer() return File.ReadAllBytes(fileArchive[delphisMainPath].fileLocation); } + /// + /// Makes it so the audioCollection data is included when exporting. + /// public void CommitAudio() { fileArchive[delphisMainPath].fileSource = FileSource.App; @@ -309,7 +312,7 @@ private static void ExportFile(FileData fd, string modRoot) Directory.CreateDirectory(modRoot + "\\" + Path.GetDirectoryName(fd.gamePath)); string newLocation = modRoot + "\\" + fd.gamePath; - if (Path.GetFileName(fd.gamePath) == "Delphis_Main.bnk") + if (fd.fileSource == FileSource.App && Path.GetFileName(fd.gamePath) == "Delphis_Main.bnk") { FileStream fs = File.Create(newLocation); fs.Write(GlobalData.gameData.audioCollection.delphisMainBuffer, 0, GlobalData.gameData.audioCollection.delphisMainBuffer.Length);