Add howto hint for removing a villager

Closes #84

ty @PandaUnit-TWL
This commit is contained in:
Kurt
2020-04-19 16:56:03 -07:00
parent d21b99978a
commit 345f3c3f1b
2 changed files with 17 additions and 0 deletions

View File

@@ -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
//

View File

@@ -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)