mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-26 21:04:41 -05:00
Update MuseumEditor.cs
This commit is contained in:
@@ -37,7 +37,7 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
|
||||
private void LB_Counts_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (LB_Donations.SelectedIndex < 0)
|
||||
if (LB_Donations.SelectedIndex < 0 || Changing)
|
||||
return;
|
||||
|
||||
SaveIndex(Index);
|
||||
@@ -73,7 +73,14 @@ private void SaveIndex(in int index)
|
||||
SetNameForIndex(index);
|
||||
}
|
||||
|
||||
private void SetNameForIndex(in int index) => LB_Donations.Items[index] = Editor.GetDonationText(GameInfo.Strings, index);
|
||||
private bool Changing;
|
||||
|
||||
private void SetNameForIndex(in int index)
|
||||
{
|
||||
Changing = true;
|
||||
LB_Donations.Items[index] = Editor.GetDonationText(GameInfo.Strings, index);
|
||||
Changing = false;
|
||||
}
|
||||
|
||||
private void B_Dump_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -94,7 +101,7 @@ private void B_Load_Click(object sender, EventArgs e)
|
||||
private void B_GiveAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveIndex(Index);
|
||||
Editor.GiveAll(GameInfo.GetStrings("en").itemlist);
|
||||
Editor.GiveAll(GameInfo.GetStrings("en").itemlist, 1000);
|
||||
Editor.Save();
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
Reference in New Issue
Block a user