Add Button To Unlock All Fashion in BDSP Misc Edits (#3856)

This commit is contained in:
Jonathan Herbert
2023-04-06 23:54:42 -04:00
committed by GitHub
parent 0dfb012e5c
commit 7ea0e21b7d
3 changed files with 30 additions and 2 deletions

View File

@@ -97,4 +97,13 @@ public void RespawnCresselia()
SAV.FlagWork.SetFlag(532, false); // clear vanish
SAV.Encounter.Roamer2Encount = 0; // not actively roaming
}
public void UnlockFashion()
{
const int FASHION_START = 1246;
const int FASHION_END = 1257;
for (int i = FASHION_START; i <= FASHION_END; i++)
SAV.FlagWork.SetFlag(i, true);
}
}

View File

@@ -41,6 +41,7 @@ private void InitializeComponent()
this.B_Darkrai = new System.Windows.Forms.Button();
this.B_Shaymin = new System.Windows.Forms.Button();
this.B_Spiritomb = new System.Windows.Forms.Button();
this.B_Fashion = new System.Windows.Forms.Button();
this.TC_Misc.SuspendLayout();
this.TAB_Main.SuspendLayout();
this.SuspendLayout();
@@ -81,7 +82,8 @@ private void InitializeComponent()
this.TC_Misc.TabIndex = 0;
//
// TAB_Main
//
//
this.TAB_Main.Controls.Add(this.B_Fashion);
this.TAB_Main.Controls.Add(this.B_Arceus);
this.TAB_Main.Controls.Add(this.B_Zones);
this.TAB_Main.Controls.Add(this.B_RebattleEyecatch);
@@ -189,6 +191,16 @@ private void InitializeComponent()
this.B_Spiritomb.UseVisualStyleBackColor = true;
this.B_Spiritomb.Click += new System.EventHandler(this.B_Spiritomb_Click);
//
// B_Fashion
//
this.B_Fashion.Location = new System.Drawing.Point(136, 262);
this.B_Fashion.Name = "B_Fashion";
this.B_Fashion.Size = new System.Drawing.Size(124, 58);
this.B_Fashion.TabIndex = 9;
this.B_Fashion.Text = "Unlock All Fashion";
this.B_Fashion.UseVisualStyleBackColor = true;
this.B_Fashion.Click += new System.EventHandler(this.B_Fashion_Click);
//
// SAV_Misc8b
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -223,5 +235,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button B_RebattleEyecatch;
private System.Windows.Forms.Button B_Zones;
private System.Windows.Forms.Button B_Arceus;
private System.Windows.Forms.Button B_Fashion;
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Windows.Forms;
using PKHeX.Core;
namespace PKHeX.WinForms;
@@ -108,4 +108,10 @@ private void B_RebattleEyecatch_Click(object sender, EventArgs e)
B_RebattleEyecatch.Enabled = false;
B_DefeatEyecatch.Enabled = true;
}
private void B_Fashion_Click(object sender, EventArgs e)
{
Unlocker.UnlockFashion();
System.Media.SystemSounds.Asterisk.Play();
}
}