Further work on static side
This commit is contained in:
33
PkmnLib.Static/Libraries/NatureLibrary.cs
Normal file
33
PkmnLib.Static/Libraries/NatureLibrary.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Static.Libraries;
|
||||
|
||||
/// <summary>
|
||||
/// The library for all natures in the game.
|
||||
/// </summary>
|
||||
public interface IReadOnlyNatureLibrary
|
||||
{
|
||||
/// <summary>
|
||||
/// Tries to get a nature from the library. Returns false if the nature is not found.
|
||||
/// </summary>
|
||||
bool TryGet(StringKey key, [MaybeNullWhen(false)] out INature value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a random nature from the library.
|
||||
/// </summary>
|
||||
INature GetRandom(IRandom random);
|
||||
|
||||
/// <summary>
|
||||
/// The amount of natures in the library.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the library is empty.
|
||||
/// </summary>
|
||||
bool IsEmpty { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IReadOnlyNatureLibrary"/>
|
||||
public class NatureLibrary : DataLibrary<INature>, IReadOnlyNatureLibrary;
|
||||
Reference in New Issue
Block a user