C interface to add species variant.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-05-04 20:40:45 +02:00
parent 119e71e86a
commit 3a9e55aae5
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 4 additions and 1 deletions

View File

@ -45,5 +45,8 @@ export uint8_t CreatureLib_CreatureSpecies_GetVariantWithHash(const SpeciesVaria
uint32_t hash) {
Try(out = p->GetVariant(hash);)
}
export uint8_t CreatureLib_CreatureSpecies_SetVariant(CreatureSpecies* p, const char* name, SpeciesVariant* variant) {
Try(p->SetVariant(Arbutils::CaseInsensitiveConstString(name), variant);)
}
#undef SIMPLE_GET_FUNC

View File

@ -33,4 +33,4 @@ Gender CreatureSpecies::GetRandomGender(Arbutils::Random& rand) const {
if (val >= this->_genderRate)
return Gender ::Female;
return Gender ::Male;
}
}