Implements genderless mons.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
fc74a7d4bd
commit
fccf339e76
|
@ -37,7 +37,9 @@ void CreatureSpecies::SetVariant(const ArbUt::CaseInsensitiveConstString& name,
|
||||||
}
|
}
|
||||||
|
|
||||||
Gender CreatureSpecies::GetRandomGender(ArbUt::Random& rand) const {
|
Gender CreatureSpecies::GetRandomGender(ArbUt::Random& rand) const {
|
||||||
// TODO: Genderless creatures
|
if (this->_genderRate == -1) {
|
||||||
|
return Gender::Genderless;
|
||||||
|
}
|
||||||
auto val = rand.GetDouble();
|
auto val = rand.GetDouble();
|
||||||
if (val >= this->_genderRate)
|
if (val >= this->_genderRate)
|
||||||
return Gender ::Female;
|
return Gender ::Female;
|
||||||
|
|
Loading…
Reference in New Issue