mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Simplify move suggestion method
Relying on linq... so rich. Take the suggested moves, select a string array, and join.
This commit is contained in:
parent
844e24024b
commit
1eff57bd87
1 changed files with 1 additions and 5 deletions
|
@ -1456,11 +1456,7 @@ namespace PKHeX
|
|||
{
|
||||
updateLegality();
|
||||
int[] m = Legality.getSuggestedRelearn();
|
||||
string[] s = new string[4];
|
||||
for (int i = 0; i < 4; i++)
|
||||
s[i] = movelist[m[i]];
|
||||
|
||||
string r = string.Join(Environment.NewLine, s);
|
||||
string r = string.Join(Environment.NewLine, m.Select(v => v >= movelist.Length ? "ERROR" : movelist[v]));
|
||||
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Apply suggested relearn moves?", r))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue