mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-01 00:12:03 +00:00
Fixed Audio Editor LOC support
This commit is contained in:
@@ -443,14 +443,14 @@ namespace PckStudio.Forms.Utilities
|
||||
int creditCount = 1;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
ValueTuple<string, string> credit_entry = new ValueTuple<string, string>("CREDIT", line);
|
||||
audioPCK.Files[0].properties.Add(credit_entry);
|
||||
//string credit_id = "IDS_CREDIT" + (creditCount != 1 ? creditCount.ToString() : "");
|
||||
//ValueTuple<string, string> creditid_entry = new ValueTuple<string, string>("CREDITID", credit_id);
|
||||
//audioPCK.Files[0].properties.Add(creditid_entry);
|
||||
//loc.AddLocKey(credit_id, line);
|
||||
//creditCount++;
|
||||
//Console.WriteLine(line);
|
||||
var credit = ("CREDIT", line);
|
||||
string credit_id = "IDS_CREDIT" + (creditCount > 1 ? creditCount.ToString() : "");
|
||||
var creditid = ("CREDITID", credit_id);
|
||||
audioPCK.Files[0].properties.Add(credit);
|
||||
audioPCK.Files[0].properties.Add(creditid);
|
||||
loc.AddLocKey(credit_id, line);
|
||||
creditCount++;
|
||||
Console.WriteLine(line);
|
||||
}
|
||||
}
|
||||
using (var stream = new MemoryStream())
|
||||
|
||||
@@ -511,7 +511,7 @@ namespace PckStudio
|
||||
throw new Exception("No .loc file found.");
|
||||
AudioEditor diag = new AudioEditor(locFile, LittleEndianCheckBox.Checked);
|
||||
diag.ShowDialog(this);
|
||||
if (diag.saved) saved = false;
|
||||
if (diag.saved) TrySetLocFile(locFile);
|
||||
diag.Dispose();
|
||||
}
|
||||
|
||||
@@ -593,7 +593,8 @@ namespace PckStudio
|
||||
throw new Exception("No .loc File found.");
|
||||
AudioEditor audioEditor = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked);
|
||||
audioEditor.ShowDialog(this);
|
||||
audioEditor.Dispose();
|
||||
if (audioEditor.saved) TrySetLocFile(locFile);
|
||||
audioEditor.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -2766,7 +2767,7 @@ namespace PckStudio
|
||||
throw new Exception("No .loc File found.");
|
||||
AudioEditor diag = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked);
|
||||
diag.ShowDialog(this);
|
||||
if (diag.saved) saved = false;
|
||||
if (diag.saved) TrySetLocFile(locFile);
|
||||
diag.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user