mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-04-25 08:04:27 -05:00
Include (stub) string validation in Gen 5
This commit is contained in:
parent
7d7ce9d360
commit
2f2dfc8866
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using PkmnFoundations.Pokedex;
|
||||
using PkmnFoundations.Support;
|
||||
using PkmnFoundations.Wfc;
|
||||
|
||||
namespace PkmnFoundations.Structures
|
||||
{
|
||||
|
|
@ -354,6 +355,18 @@ namespace PkmnFoundations.Structures
|
|||
if (move.MoveID > 559) return new ValidationSummary() { IsValid = false };
|
||||
}
|
||||
|
||||
if (thePokemon is Pokemon5)
|
||||
{
|
||||
var thePokemon5 = (Pokemon5)thePokemon;
|
||||
if (!thePokemon5.NicknameEncoded.IsValid) return new ValidationSummary() { IsValid = false };
|
||||
if (!thePokemon5.TrainerNameEncoded.IsValid) return new ValidationSummary() { IsValid = false };
|
||||
}
|
||||
else if (thePokemon is BattleSubwayPokemon5)
|
||||
{
|
||||
var theBattleSubwayPokemon5 = (BattleSubwayPokemon5)thePokemon;
|
||||
if (!theBattleSubwayPokemon5.NicknameEncoded.IsValid) return new ValidationSummary() { IsValid = false };
|
||||
}
|
||||
|
||||
return new ValidationSummary() { IsValid = true };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,6 +203,8 @@ namespace PkmnFoundations.Wfc
|
|||
{
|
||||
if (!base.Validate()) return false;
|
||||
|
||||
if (!TrainerNameEncoded.IsValid) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user