mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-29 18:34:33 +00:00
Fix for AudioEditor allowing empty categories
This commit is contained in:
@@ -262,8 +262,15 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
|
||||
PCKAudioFile.AudioCategory overworldCategory = audioFile.GetCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld);
|
||||
|
||||
foreach (var category in audioFile.Categories)
|
||||
{
|
||||
if (category.SongNames.Count < 1)
|
||||
{
|
||||
MessageBox.Show("The game will crash upon loading your pack if any of the categories are empty. Please remove or occupy the category.", "Empty Category");
|
||||
return;
|
||||
}
|
||||
|
||||
category.Name = "";
|
||||
if (playOverworldInCreative.Checked && category.audioType == PCKAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
@@ -279,14 +286,6 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
|
||||
bool emptyCat = false;
|
||||
|
||||
if (emptyCat)
|
||||
{
|
||||
MessageBox.Show("The game will crash upon loading your pack if a category is empty", "Empty Category");
|
||||
return;
|
||||
}
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
PCKAudioFileWriter.Write(stream, audioFile, _isLittleEndian);
|
||||
|
||||
Reference in New Issue
Block a user