mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-11 15:07:11 +00:00
Minor reorganization
amount of pkm obj classes is pretty high, move the static utility classes to another folder breaks usage of pkm.ShowdownText; removes a dependency from PKM.
This commit is contained in:
parent
8cf70770cf
commit
95b4d0820d
14 changed files with 8 additions and 32 deletions
|
@ -2173,7 +2173,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
if (IsYellow)
|
||||
return false;
|
||||
// Yellow only moves in Red/Blue game, must be Allakazham
|
||||
// Yellow only moves in Red/Blue game, must be Alakazam
|
||||
if (pk1.Moves.Contains(134)) // Kinesis, yellow only move
|
||||
return true;
|
||||
if (pk1.CurrentLevel < 20 && pkm.Moves.Contains(50)) // Obtaining Disable below level 20 implies a yellow only move
|
||||
|
|
|
@ -352,7 +352,6 @@ namespace PKHeX.Core
|
|||
x = (x << p1) | (x << p2);
|
||||
return value ^ x;
|
||||
}
|
||||
public string ShowdownText => ShowdownSet.GetShowdownText(this);
|
||||
public string[] QRText => this.GetQRLines();
|
||||
|
||||
public virtual string FileName
|
||||
|
|
|
@ -1133,7 +1133,7 @@ namespace PKHeX.WinForms.Controls
|
|||
{
|
||||
try
|
||||
{
|
||||
var str = string.Join(Environment.NewLine + Environment.NewLine, SAV.PartyData.Select(pk => pk.ShowdownText));
|
||||
var str = string.Join(Environment.NewLine + Environment.NewLine, SAV.PartyData.Select(ShowdownSet.GetShowdownText));
|
||||
if (string.IsNullOrWhiteSpace(str)) return;
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
|
@ -1144,7 +1144,7 @@ namespace PKHeX.WinForms.Controls
|
|||
{
|
||||
try
|
||||
{
|
||||
var str = string.Join(Environment.NewLine + Environment.NewLine, SAV.BattleBoxData.Select(pk => pk.ShowdownText));
|
||||
var str = string.Join(Environment.NewLine + Environment.NewLine, SAV.BattleBoxData.Select(ShowdownSet.GetShowdownText));
|
||||
if (string.IsNullOrWhiteSpace(str)) return;
|
||||
Clipboard.SetText(str);
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace PKHeX.WinForms.Controls
|
|||
if (pk.Species == 0)
|
||||
ShowSet.RemoveAll();
|
||||
else
|
||||
ShowSet.SetToolTip(pb, pk.ShowdownText);
|
||||
ShowSet.SetToolTip(pb, ShowdownSet.GetShowdownText(pk));
|
||||
}
|
||||
private void PlayCry(PKM pk)
|
||||
{
|
||||
|
|
|
@ -413,7 +413,8 @@ namespace PKHeX.WinForms
|
|||
return;
|
||||
}
|
||||
|
||||
var text = PreparePKM().ShowdownText;
|
||||
var pk = PreparePKM();
|
||||
var text = ShowdownSet.GetShowdownText(pk);
|
||||
Clipboard.SetText(text);
|
||||
var clip = Clipboard.GetText();
|
||||
if (clip != text)
|
||||
|
@ -421,32 +422,8 @@ namespace PKHeX.WinForms
|
|||
else
|
||||
WinFormsUtil.Alert(MsgSimulatorExportSuccess, text);
|
||||
}
|
||||
private void ClickShowdownExportParty(object sender, EventArgs e)
|
||||
{
|
||||
var data = C_SAV.SAV.PartyData;
|
||||
if (data.Count <= 0) return;
|
||||
try
|
||||
{
|
||||
var split = Environment.NewLine + Environment.NewLine;
|
||||
var sets = data.Select(z => z.ShowdownText);
|
||||
Clipboard.SetText(string.Join(split, sets));
|
||||
WinFormsUtil.Alert(MsgSimulatorExportParty);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
private void ClickShowdownExportBattleBox(object sender, EventArgs e)
|
||||
{
|
||||
var data = C_SAV.SAV.BattleBoxData;
|
||||
if (data.Count <= 0) return;
|
||||
try
|
||||
{
|
||||
var split = Environment.NewLine + Environment.NewLine;
|
||||
var sets = data.Select(z => z.ShowdownText);
|
||||
Clipboard.SetText(string.Join(split, sets));
|
||||
WinFormsUtil.Alert(MsgSimulatorExportBattleBox);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
private void ClickShowdownExportParty(object sender, EventArgs e) => C_SAV.ClickShowdownExportParty(sender, e);
|
||||
private void ClickShowdownExportBattleBox(object sender, EventArgs e) => C_SAV.ClickShowdownExportBattleBox(sender, e);
|
||||
|
||||
// Main Menu Subfunctions
|
||||
private void OpenQuick(string path, bool force = false)
|
||||
|
|
Loading…
Reference in a new issue