diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-26 19:03:35 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-26 19:03:35 +0000 |
| commit | 31601349dff4b78a03bda0912d8d79b43eae42b0 (patch) | |
| tree | d81b20394a8b2a13728c22cf5e75ae77e747144d /pokescripting/SpeciesWrapper.cpp | |
| parent | 940e5d4b55bbd1261bf0ccb3a915b79cf2a240c8 (diff) | |
| download | sigen-31601349dff4b78a03bda0912d8d79b43eae42b0.tar.gz sigen-31601349dff4b78a03bda0912d8d79b43eae42b0.tar.xz sigen-31601349dff4b78a03bda0912d8d79b43eae42b0.zip | |
[FIX] Enumerations now have access from scripts (name->value)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@245 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokescripting/SpeciesWrapper.cpp')
| -rw-r--r-- | pokescripting/SpeciesWrapper.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pokescripting/SpeciesWrapper.cpp b/pokescripting/SpeciesWrapper.cpp index 23f76082..e80c364d 100644 --- a/pokescripting/SpeciesWrapper.cpp +++ b/pokescripting/SpeciesWrapper.cpp @@ -53,6 +53,23 @@ Pokemod::Hat<Pokescripting::ItemWrapper*> Pokescripting::SpeciesWrapper::itemHat return hat; } +Pokemod::Species::Style Pokescripting::SpeciesWrapper::growth(const QString& name) const +{ + if (name == "Fluctuating") + return Pokemod::Species::Fluctuating; + else if (name == "Fading") + return Pokemod::Species::Fading; + else if (name == "Slow") + return Pokemod::Species::Slow; + else if (name == "Normal") + return Pokemod::Species::Normal; + else if (name == "Fast") + return Pokemod::Species::Fast; + else if (name == "Erratic") + return Pokemod::Species::Erratic; + return QVariant(-1).value<Pokemod::Species::Style>(); +} + QString Pokescripting::SpeciesWrapper::name() const { return m_species->name(); |
