diff --git a/NHSE.WinForms/Controls/VillagerEditor.Designer.cs b/NHSE.WinForms/Controls/VillagerEditor.Designer.cs index 31261e7..96c38fc 100644 --- a/NHSE.WinForms/Controls/VillagerEditor.Designer.cs +++ b/NHSE.WinForms/Controls/VillagerEditor.Designer.cs @@ -73,6 +73,7 @@ private void InitializeComponent() this.CHK_VillagerMovingOut.TabIndex = 45; this.CHK_VillagerMovingOut.Text = "Moving Out"; this.CHK_VillagerMovingOut.UseVisualStyleBackColor = true; + this.CHK_VillagerMovingOut.CheckedChanged += new System.EventHandler(this.CHK_VillagerMovingOut_CheckedChanged); // // B_EditFurniture // diff --git a/NHSE.WinForms/Controls/VillagerEditor.cs b/NHSE.WinForms/Controls/VillagerEditor.cs index fc254ec..3ca0a71 100644 --- a/NHSE.WinForms/Controls/VillagerEditor.cs +++ b/NHSE.WinForms/Controls/VillagerEditor.cs @@ -12,6 +12,7 @@ public partial class VillagerEditor : UserControl public IVillagerOrigin Origin; private readonly MainSave SAV; private int VillagerIndex = -1; + private bool Loading; public VillagerEditor(Villager[] villagers, IVillagerOrigin origin, MainSave sav, bool hasHouses) { @@ -54,11 +55,13 @@ private void LoadVillager(int index) private void LoadVillager(Villager v) { + Loading = true; NUD_Species.Value = v.Species; NUD_Variant.Value = v.Variant; CB_Personality.SelectedIndex = (int)v.Personality; TB_Catchphrase.Text = v.CatchPhrase; CHK_VillagerMovingOut.Checked = v.MovingOut; + Loading = false; } private void SaveVillager(int index) @@ -72,6 +75,19 @@ private void SaveVillager(int index) v.MovingOut = CHK_VillagerMovingOut.Checked; } + private void CHK_VillagerMovingOut_CheckedChanged(object sender, EventArgs e) + { + if (Loading) + return; + + if (!CHK_VillagerMovingOut.Checked) + return; + + const string question = "Are you trying to make the Villager move out?"; + const string reply = "If so, set the Event Flag (024 - ForceMoveOut) to 1 so that the Villager is removed by the game."; + WinFormsUtil.Alert(question, reply); + } + private void B_DumpVillager_Click(object sender, EventArgs e) { if (ModifierKeys == Keys.Shift)