mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
ee9ae63c22
Move enum -> ushort instead of int Redo handling of HOME Volt Tackle (disallow on SWSH Cap Pikachu) Pass spans instead of strings to use span methods Reset encounter filters on early abort
28 lines
1 KiB
C#
28 lines
1 KiB
C#
using System;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Exposes permissions about Item Storage (Pouch) constraints.
|
|
/// </summary>
|
|
public interface IItemStorage
|
|
{
|
|
/// <summary>
|
|
/// Indicates if the item is actually obtainable for the given <see cref="type"/>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This is used to check if the item is legal to obtain, not if the item can exist in the pouch.
|
|
/// </remarks>
|
|
/// <param name="type">Type of inventory to check.</param>
|
|
/// <param name="itemIndex">Item ID to check.</param>
|
|
/// <param name="itemCount">Quantity value for the item.</param>
|
|
/// <returns>True if the item is possible to obtain.</returns>
|
|
bool IsLegal(InventoryType type, int itemIndex, int itemCount);
|
|
|
|
/// <summary>
|
|
/// Gets all possible item IDs that can exist in the given pouch <see cref="type"/>.
|
|
/// </summary>
|
|
/// <param name="type">Type of inventory to check.</param>
|
|
/// <returns>List of all possible item IDs.</returns>
|
|
ReadOnlySpan<ushort> GetItems(InventoryType type);
|
|
}
|