diff options
Diffstat (limited to 'pokemod/Nature.cpp')
| -rw-r--r-- | pokemod/Nature.cpp | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index 128651ce..ed4aa73a 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -44,20 +44,41 @@ PokeGen::PokeMod::Nature::~Nature() LogDtor("Nature", id, name);
}
-#ifdef POKEMODR
-void PokeGen::PokeMod::Nature::Validate(wxListBox &output)
-#else
void PokeGen::PokeMod::Nature::Validate()
-#endif
{
isValid = true;
LogValidateStart("Nature", id, name);
if (name == "")
{
LogVarNotSet("Nature", "name", id);
-# ifdef POKEMODR
+ isValid = false;
+ }
+ if (GetNatureEffectCount())
+ {
+ for (unsigned i = 0; i < GetNatureEffectCount(); ++i)
+ {
+ LogSubmoduleIterate("Nature", "effect", i, id, name);
+ if (!effects[i].IsValid())
+ isValid = false;
+ }
+ }
+ else
+ {
+ LogSubmoduleEmpty("Nature", "effects", id, name);
+ isValid = false;
+ }
+ LogValidationOver("Nature", isValid, id, name);
+}
+
+#ifdef PG_DEBUG_WINDOW
+void PokeGen::PokeMod::Nature::Validate(wxListBox &output)
+{
+ isValid = true;
+ LogValidateStart("Nature", id, name);
+ if (name == "")
+ {
+ LogVarNotSet("Nature", "name", id);
output.Append(ConsoleLogVarNotSet("Nature", "name", id);
-# endif
isValid = false;
}
if (GetNatureEffectCount())
@@ -72,13 +93,12 @@ void PokeGen::PokeMod::Nature::Validate() else
{
LogSubmoduleEmpty("Nature", "effects", id, name);
-# ifdef POKEMODR
output.Append(ConsoleLogSubmoduleEmpty("Nature", "effects", id, name));
-# endif
isValid = false;
}
LogValidationOver("Nature", isValid, id, name);
}
+#endif
void PokeGen::PokeMod::Nature::ImportXml(XmlElement &xml, unsigned _id)
{
|
