Skip to content

Commit f400ab3

Browse files
committed
Play Windows Error sound when trying to open up a patch stack for vanilla.
1 parent 68389be commit f400ab3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Universal THCRAP Launcher/MainForm.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Globalization;
66
using System.IO;
77
using System.Linq;
8+
using System.Media;
89
using System.Net;
910
using System.Reflection;
1011
using System.Text;
@@ -413,6 +414,20 @@ private void openConfigureTS_Click(object sender, EventArgs e)
413414

414415
private void openSelectedPatchConfigurationTS_Click(object sender, EventArgs e)
415416
{
417+
if (patchListBox.SelectedIndex == -1)
418+
{
419+
SystemSounds.Hand.Play();
420+
return;
421+
}
422+
423+
string v;
424+
v = (I18N.LangResource.mainForm.vanilla.ToString() is null) ? @"VANILLA" : I18N.LangResource.mainForm.vanilla.ToString();
425+
if (patchListBox.SelectedItem.ToString().Contains(v))
426+
{
427+
SystemSounds.Hand.Play();
428+
return;
429+
}
430+
416431
string path = Directory.GetCurrentDirectory() + @"\" + CONFIG_FOLDER +
417432
patchListBox.SelectedItem.ToString().Replace(" ★", "");
418433
if (Configuration1.HidePatchExtension)

0 commit comments

Comments
 (0)