mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
Remove duplicate song saving (#356)
* Unrecognized entity support Due to some recent discoveries about a certain upcoming rhythm game, I have added support for unrecognized entities found in remix.json to be loaded and moved, and be able to save them. * Discord RPC Toggle Required for Mac use. Since there is no persistent settings save, it must be re-enabled each time you open the program. * Revert "Discord RPC Toggle" This reverts commit 249ee69ecb1837048fb2f1e45c5dbfffabb11b47. * Revert "Revert "Discord RPC Toggle"" This reverts commit c2eca02e94d5bc4924c87099f71a25fff8ff101d. * Remove duplicate song saving FileMode.OpenOrCreate go brrrrrr * Delete Properties.meta whats that still doing there
This commit is contained in:
parent
4b56dfeb94
commit
04cbfae438
1 changed files with 4 additions and 2 deletions
|
@ -382,7 +382,7 @@ namespace HeavenStudio.Editor
|
|||
|
||||
private void SaveRemixFile(string path)
|
||||
{
|
||||
using (FileStream zipFile = File.Open(path, FileMode.Create))
|
||||
using (FileStream zipFile = File.Open(path, FileMode.OpenOrCreate))
|
||||
{
|
||||
using (var archive = new ZipArchive(zipFile, ZipArchiveMode.Update))
|
||||
{
|
||||
|
@ -390,12 +390,14 @@ namespace HeavenStudio.Editor
|
|||
using (var zipStream = levelFile.Open())
|
||||
zipStream.Write(Encoding.UTF8.GetBytes(GetJson()), 0, Encoding.UTF8.GetBytes(GetJson()).Length);
|
||||
|
||||
if (MusicBytes != null)
|
||||
if ((MusicBytes != null) && (changedMusic == true))
|
||||
{
|
||||
Debug.Log("Saving music...");
|
||||
var musicFile = archive.CreateEntry("song.ogg", System.IO.Compression.CompressionLevel.NoCompression);
|
||||
using (var zipStream = musicFile.Open())
|
||||
zipStream.Write(MusicBytes, 0, MusicBytes.Length);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
currentRemixPath = path;
|
||||
|
|
Loading…
Reference in a new issue