diff options
Diffstat (limited to 'sigscript/SpeciesWrapper.cpp')
-rw-r--r-- | sigscript/SpeciesWrapper.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sigscript/SpeciesWrapper.cpp b/sigscript/SpeciesWrapper.cpp index c1ea6da0..08c59b68 100644 --- a/sigscript/SpeciesWrapper.cpp +++ b/sigscript/SpeciesWrapper.cpp @@ -108,22 +108,19 @@ int Sigscript::SpeciesWrapper::maxHoldWeight() const Sigcore::Fraction Sigscript::SpeciesWrapper::runChance() const { - if (sigmod()->singlePlayer() && hasValueOfType<Sigcore::Fraction>("runChance")) - return valueOfType<Sigcore::Fraction>("runChance"); + ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, runChance); return m_species->runChance(); } Sigcore::Fraction Sigscript::SpeciesWrapper::fleeChance() const { - if (sigmod()->singlePlayer() && hasValueOfType<Sigcore::Fraction>("fleeChance")) - return valueOfType<Sigcore::Fraction>("fleeChance"); + ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, fleeChance); return m_species->fleeChance(); } Sigcore::Fraction Sigscript::SpeciesWrapper::itemChance() const { - if (sigmod()->singlePlayer() && hasValueOfType<Sigcore::Fraction>("itemChance")) - return valueOfType<Sigcore::Fraction>("itemChance"); + ALLOW_OVERRIDE_SO(species, Sigcore::Fraction, itemChance); return m_species->itemChance(); } @@ -179,8 +176,7 @@ Sigcore::Fraction Sigscript::SpeciesWrapper::genderFactor() const int Sigscript::SpeciesWrapper::eggSpecies() const { - if (sigmod()->singlePlayer() && hasValueOfType<int>("eggSpecies")) - return valueOfType<int>("eggSpecies"); + ALLOW_OVERRIDE_SO(species, int, eggSpecies); return m_species->eggSpecies(); } |