Implements genderless mons.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-06-10 12:16:09 +02:00
1 parent fc74a7d4bd
commit fccf339e76
1 file changed
+3 -1
+3 -1
View File
@@ -37,7 +37,9 @@ void CreatureSpecies::SetVariant(const ArbUt::CaseInsensitiveConstString& name,
}
Gender CreatureSpecies::GetRandomGender(ArbUt::Random& rand) const {
// TODO: Genderless creatures
if (this->_genderRate == -1) {
return Gender::Genderless;
}
auto val = rand.GetDouble();
if (val >= this->_genderRate)
return Gender ::Female;