From 7ecd77838d795027f7e68ebf52fed9aa9257e8ff Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 16 Apr 2017 17:06:15 -0700 Subject: [PATCH] Add adjustable call rate to modifier macro Closes #128, same implementation but allows a certain value to be set (without line ending changes) Closes #91 --- .../Subforms/Gen7/PersonalEditor7.Designer.cs | 51 ++++++++++++++++++- pk3DS/Subforms/Gen7/PersonalEditor7.cs | 2 + 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/pk3DS/Subforms/Gen7/PersonalEditor7.Designer.cs b/pk3DS/Subforms/Gen7/PersonalEditor7.Designer.cs index f7ed39a..487290c 100644 --- a/pk3DS/Subforms/Gen7/PersonalEditor7.Designer.cs +++ b/pk3DS/Subforms/Gen7/PersonalEditor7.Designer.cs @@ -149,6 +149,9 @@ private void InitializeComponent() this.B_Randomize = new System.Windows.Forms.Button(); this.PB_MonSprite = new System.Windows.Forms.PictureBox(); this.B_Dump = new System.Windows.Forms.Button(); + this.CHK_CallRate = new System.Windows.Forms.CheckBox(); + this.L_CallRateVal = new System.Windows.Forms.Label(); + this.NUD_CallRate = new System.Windows.Forms.NumericUpDown(); this.TC_Pokemon.SuspendLayout(); this.TP_General.SuspendLayout(); this.TP_MoveTutors.SuspendLayout(); @@ -160,6 +163,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_TypePercent)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_StatDev)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_CallRate)).BeginInit(); this.SuspendLayout(); // // CB_Species @@ -975,7 +979,7 @@ private void InitializeComponent() this.TP_MoveTutors.Location = new System.Drawing.Point(4, 22); this.TP_MoveTutors.Name = "TP_MoveTutors"; this.TP_MoveTutors.Padding = new System.Windows.Forms.Padding(3); - this.TP_MoveTutors.Size = new System.Drawing.Size(437, 359); + this.TP_MoveTutors.Size = new System.Drawing.Size(437, 349); this.TP_MoveTutors.TabIndex = 1; this.TP_MoveTutors.Text = "Move Tutors"; this.TP_MoveTutors.UseVisualStyleBackColor = true; @@ -1077,13 +1081,16 @@ private void InitializeComponent() this.TP_Randomizer.Controls.Add(this.B_Randomize); this.TP_Randomizer.Location = new System.Drawing.Point(4, 22); this.TP_Randomizer.Name = "TP_Randomizer"; - this.TP_Randomizer.Size = new System.Drawing.Size(437, 359); + this.TP_Randomizer.Size = new System.Drawing.Size(437, 349); this.TP_Randomizer.TabIndex = 2; this.TP_Randomizer.Text = "Enhancements"; this.TP_Randomizer.UseVisualStyleBackColor = true; // // GB_Modifier // + this.GB_Modifier.Controls.Add(this.CHK_CallRate); + this.GB_Modifier.Controls.Add(this.L_CallRateVal); + this.GB_Modifier.Controls.Add(this.NUD_CallRate); this.GB_Modifier.Controls.Add(this.CHK_EXP); this.GB_Modifier.Controls.Add(this.CHK_Growth); this.GB_Modifier.Controls.Add(this.CHK_QuickHatch); @@ -1513,6 +1520,42 @@ private void InitializeComponent() this.B_Dump.UseVisualStyleBackColor = true; this.B_Dump.Click += new System.EventHandler(this.B_Dump_Click); // + // CHK_CallRate + // + this.CHK_CallRate.AutoSize = true; + this.CHK_CallRate.Location = new System.Drawing.Point(203, 66); + this.CHK_CallRate.Name = "CHK_CallRate"; + this.CHK_CallRate.Size = new System.Drawing.Size(128, 17); + this.CHK_CallRate.TabIndex = 13; + this.CHK_CallRate.Text = "Modify SOS Call Rate"; + this.CHK_CallRate.UseVisualStyleBackColor = true; + // + // L_CallRateVal + // + this.L_CallRateVal.AutoSize = true; + this.L_CallRateVal.Location = new System.Drawing.Point(203, 86); + this.L_CallRateVal.Name = "L_CallRateVal"; + this.L_CallRateVal.Size = new System.Drawing.Size(34, 13); + this.L_CallRateVal.TabIndex = 12; + this.L_CallRateVal.Text = "Value"; + // + // NUD_CallRate + // + this.NUD_CallRate.Location = new System.Drawing.Point(266, 84); + this.NUD_CallRate.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.NUD_CallRate.Name = "NUD_CallRate"; + this.NUD_CallRate.Size = new System.Drawing.Size(46, 20); + this.NUD_CallRate.TabIndex = 11; + this.NUD_CallRate.Value = new decimal(new int[] { + 15, + 0, + 0, + 0}); + // // PersonalEditor7 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1545,6 +1588,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_TypePercent)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_StatDev)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_CallRate)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1673,5 +1717,8 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CHK_Variant; private System.Windows.Forms.Label L_CallRate; private System.Windows.Forms.MaskedTextBox TB_CallRate; + private System.Windows.Forms.CheckBox CHK_CallRate; + private System.Windows.Forms.Label L_CallRateVal; + private System.Windows.Forms.NumericUpDown NUD_CallRate; } } diff --git a/pk3DS/Subforms/Gen7/PersonalEditor7.cs b/pk3DS/Subforms/Gen7/PersonalEditor7.cs index 0103fd1..95b1601 100644 --- a/pk3DS/Subforms/Gen7/PersonalEditor7.cs +++ b/pk3DS/Subforms/Gen7/PersonalEditor7.cs @@ -399,6 +399,8 @@ private void B_ModifyAll(object sender, EventArgs e) if (CHK_QuickHatch.Checked) TB_HatchCycles.Text = 1.ToString(); + if (CHK_CallRate.Checked) + TB_CallRate.Text = ((int)NUD_CallRate.Value).ToString(); } CB_Species.SelectedIndex = 1; Util.Alert("All species modified to specification!");