2022-08-21 08:39:16 +00:00
|
|
|
using System;
|
2022-02-05 01:26:15 +00:00
|
|
|
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
|
2022-08-21 08:39:16 +00:00
|
|
|
/// <summary>
|
2022-11-25 01:42:17 +00:00
|
|
|
/// Exposes info about the Technical Machine / Technical Record (TR) compatibility and history of use.
|
2022-08-21 08:39:16 +00:00
|
|
|
/// </summary>
|
2022-11-25 01:42:17 +00:00
|
|
|
public interface ITechRecord
|
2022-02-05 01:26:15 +00:00
|
|
|
{
|
2022-08-21 08:39:16 +00:00
|
|
|
/// <summary>
|
2023-01-22 04:02:33 +00:00
|
|
|
/// Rules for permitting the given record.
|
2022-08-21 08:39:16 +00:00
|
|
|
/// </summary>
|
2023-01-22 04:02:33 +00:00
|
|
|
public IPermitRecord Permit { get; }
|
2022-11-25 01:42:17 +00:00
|
|
|
|
2022-08-21 08:39:16 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Indicates if the TR has been previously used on this entity to learn the move.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="index">TR index</param>
|
|
|
|
/// <returns>True if learned</returns>
|
2022-02-05 01:26:15 +00:00
|
|
|
bool GetMoveRecordFlag(int index);
|
2022-08-21 08:39:16 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Sets the flag indicating that the TR has been learned.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="index">TR index</param>
|
|
|
|
/// <param name="value">True if learned</param>
|
2022-06-18 18:04:24 +00:00
|
|
|
void SetMoveRecordFlag(int index, bool value = true);
|
2022-08-21 08:39:16 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Indicates if any move has been learned via TR.
|
|
|
|
/// </summary>
|
2022-02-05 01:26:15 +00:00
|
|
|
bool GetMoveRecordFlagAny();
|
|
|
|
}
|
2023-01-22 04:02:33 +00:00
|
|
|
|
|
|
|
public interface IPermitRecord
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Individual accessed indexes indicate if they can be learned.
|
|
|
|
/// </summary>
|
|
|
|
bool IsRecordPermitted(int index);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Individual accessed move IDs that a given record remembers.
|
|
|
|
/// </summary>
|
|
|
|
ReadOnlySpan<ushort> RecordPermitIndexes { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maximum count of record flags that are available.
|
|
|
|
/// </summary>
|
|
|
|
int RecordCountTotal { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maximum count of record flags that are used.
|
|
|
|
/// </summary>
|
|
|
|
int RecordCountUsed { get; }
|
|
|
|
}
|