mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Move enum to separate file
This commit is contained in:
parent
dd9b31dbbe
commit
507eef43e7
2 changed files with 27 additions and 34 deletions
|
@ -1,26 +1,5 @@
|
|||
namespace PKHeX.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Source the Move was learned from
|
||||
/// </summary>
|
||||
public enum MoveSource
|
||||
{
|
||||
Unknown,
|
||||
None,
|
||||
Relearn,
|
||||
Initial,
|
||||
LevelUp,
|
||||
TMHM,
|
||||
Tutor,
|
||||
EggMove,
|
||||
InheritLevelUp,
|
||||
Special,
|
||||
SpecialEgg,
|
||||
ShedinjaEvo,
|
||||
Sketch,
|
||||
Shared,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move specific <see cref="CheckResult"/> to contain in which Generation it was learned & source.
|
||||
/// </summary>
|
||||
|
@ -52,28 +31,19 @@
|
|||
/// <remarks>Invalid moves that can't be validated should be here, hence the inclusion.</remarks>
|
||||
public bool ShouldBeInRelearnMoves() => Source != MoveSource.None && (!Valid || IsRelearn);
|
||||
|
||||
internal CheckMoveResult(MoveSource m, int g, CheckIdentifier i)
|
||||
: base(i)
|
||||
internal CheckMoveResult(MoveSource m, int g, CheckIdentifier i) : base(i)
|
||||
{
|
||||
Source = m;
|
||||
Generation = g;
|
||||
}
|
||||
|
||||
internal CheckMoveResult(MoveSource m, int g, Severity s, string c, CheckIdentifier i)
|
||||
: base(s, c, i)
|
||||
internal CheckMoveResult(MoveSource m, int g, Severity s, string c, CheckIdentifier i) : base(s, c, i)
|
||||
{
|
||||
Source = m;
|
||||
Generation = g;
|
||||
}
|
||||
|
||||
internal CheckMoveResult(CheckMoveResult Org, Severity s, string c, CheckIdentifier i)
|
||||
: this(Org.Source, Org.Generation, s, c, i)
|
||||
{
|
||||
}
|
||||
|
||||
internal CheckMoveResult(CheckMoveResult Org, Severity s, string c)
|
||||
: this(Org.Source, Org.Generation, s, c, Org.Identifier)
|
||||
{
|
||||
}
|
||||
internal CheckMoveResult(CheckMoveResult original, Severity s, string c, CheckIdentifier i) : this(original.Source, original.Generation, s, c, i) { }
|
||||
internal CheckMoveResult(CheckMoveResult original, Severity s, string c) : this(original.Source, original.Generation, s, c, original.Identifier) { }
|
||||
}
|
||||
}
|
||||
|
|
23
PKHeX.Core/Legality/Structures/MoveSource.cs
Normal file
23
PKHeX.Core/Legality/Structures/MoveSource.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
namespace PKHeX.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates the method of learning a move
|
||||
/// </summary>
|
||||
public enum MoveSource
|
||||
{
|
||||
Unknown,
|
||||
None,
|
||||
Relearn,
|
||||
Initial,
|
||||
LevelUp,
|
||||
TMHM,
|
||||
Tutor,
|
||||
EggMove,
|
||||
InheritLevelUp,
|
||||
Special,
|
||||
SpecialEgg,
|
||||
ShedinjaEvo,
|
||||
Sketch,
|
||||
Shared,
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue