mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-20 17:33:25 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
34 lines
836 B
C#
34 lines
836 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
public abstract class BattleVideo : IPokeGroup
|
|
{
|
|
public abstract IReadOnlyList<PKM> BattlePKMs { get; }
|
|
public abstract int Generation { get; }
|
|
|
|
public IEnumerable<PKM> Contents => BattlePKMs;
|
|
|
|
public static BattleVideo? GetVariantBattleVideo(byte[] data)
|
|
{
|
|
if (BV6.IsValid(data))
|
|
return new BV6(data);
|
|
if (BV7.IsValid(data))
|
|
return new BV7(data);
|
|
if (BV3.IsValid(data))
|
|
return new BV3(data);
|
|
return null;
|
|
}
|
|
|
|
public static bool IsValid(ReadOnlySpan<byte> data)
|
|
{
|
|
if (BV6.IsValid(data))
|
|
return true;
|
|
if (BV7.IsValid(data))
|
|
return true;
|
|
if (BV3.IsValid(data))
|
|
return true;
|
|
return false;
|
|
}
|
|
}
|