Implements some micro-optimizations
All checks were successful
Build / Build (push) Successful in 51s
All checks were successful
Build / Build (push) Successful in 51s
This commit is contained in:
@@ -88,7 +88,7 @@ public interface IForm : INamedValue
|
||||
/// <summary>
|
||||
/// Check if the form has a specific flag set.
|
||||
/// </summary>
|
||||
bool HasFlag(string key);
|
||||
bool HasFlag(StringKey key);
|
||||
|
||||
/// <summary>
|
||||
/// Check if the form is a battle-only form, meaning it should return to its original form after the battle ends.
|
||||
@@ -208,7 +208,7 @@ public class FormImpl : IForm
|
||||
public StringKey GetRandomHiddenAbility(IRandom rand) => HiddenAbilities[rand.GetInt(HiddenAbilities.Count)];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasFlag(string key) => Flags.Contains(key);
|
||||
public bool HasFlag(StringKey key) => Flags.Contains(key);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsBattleOnlyForm { get; }
|
||||
|
||||
@@ -64,7 +64,7 @@ public interface ISpecies : INamedValue
|
||||
/// <summary>
|
||||
/// Check whether the Pokémon has a specific flag set.
|
||||
/// </summary>
|
||||
bool HasFlag(string key);
|
||||
bool HasFlag(StringKey key);
|
||||
|
||||
/// <summary>
|
||||
/// The data regarding into which Pokémon this species can evolve, and how.
|
||||
@@ -147,5 +147,5 @@ public class SpeciesImpl : ISpecies
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasFlag(string key) => Flags.Contains(key);
|
||||
public bool HasFlag(StringKey key) => Flags.Contains(key);
|
||||
}
|
||||
Reference in New Issue
Block a user