Style cleanup
This commit is contained in:
@@ -13,7 +13,7 @@ public interface IReadOnlySpeciesLibrary : IEnumerable<ISpecies>
|
||||
/// Tries to get a species from the library. Returns false if the species is not found.
|
||||
/// </summary>
|
||||
bool TryGet(StringKey key, [MaybeNullWhen(false)] out ISpecies value);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tried to get a species from the library by its national dex number. Returns false if the species is not found.
|
||||
/// </summary>
|
||||
@@ -45,7 +45,7 @@ public interface IReadOnlySpeciesLibrary : IEnumerable<ISpecies>
|
||||
public class SpeciesLibrary : DataLibrary<ISpecies>, IReadOnlySpeciesLibrary
|
||||
{
|
||||
private Dictionary<ISpecies, ISpecies> _preEvolutionCache = new();
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool TryGetById(int id, [MaybeNullWhen(false)] out ISpecies value)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ public class SpeciesLibrary : DataLibrary<ISpecies>, IReadOnlySpeciesLibrary
|
||||
return preEvolution;
|
||||
foreach (var s in this)
|
||||
{
|
||||
if (s.EvolutionData.All(e => e.ToSpecies != species.Name))
|
||||
if (s.EvolutionData.All(e => e.ToSpecies != species.Name))
|
||||
continue;
|
||||
_preEvolutionCache[species] = s;
|
||||
return s;
|
||||
|
||||
Reference in New Issue
Block a user