mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Ignore empty pkms when exporting a list of sets
chain method calls
This commit is contained in:
parent
39ce7e56e4
commit
1ab7acc958
|
|
@ -561,7 +561,7 @@ public static IEnumerable<ShowdownSet> GetShowdownSets(IEnumerable<string> lines
|
|||
/// </summary>
|
||||
/// <param name="data">Pokémon data to summarize.</param>
|
||||
/// <returns>Consumable list of <see cref="ShowdownSet.Text"/> lines.</returns>
|
||||
public static IEnumerable<string> GetShowdownSets(IEnumerable<PKM> data) => data.Select(GetShowdownText);
|
||||
public static IEnumerable<string> GetShowdownSets(IEnumerable<PKM> data) => data.Where(p => p.Species != 0).Select(GetShowdownText);
|
||||
|
||||
/// <summary>
|
||||
/// Fetches ShowdownSet lines from the input <see cref="PKM"/> data, and combines it into one string.
|
||||
|
|
@ -569,6 +569,6 @@ public static IEnumerable<ShowdownSet> GetShowdownSets(IEnumerable<string> lines
|
|||
/// <param name="data">Pokémon data to summarize.</param>
|
||||
/// <param name="separator">Splitter between each set.</param>
|
||||
/// <returns>Single string containing all <see cref="ShowdownSet.Text"/> lines.</returns>
|
||||
public static string GetShowdownSets(IEnumerable<PKM> data, string separator) => string.Join(separator, data.Select(GetShowdownText));
|
||||
public static string GetShowdownSets(IEnumerable<PKM> data, string separator) => string.Join(separator, GetShowdownSets(data));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user