C interface to add species variant.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
119e71e86a
commit
3a9e55aae5
|
@ -45,5 +45,8 @@ export uint8_t CreatureLib_CreatureSpecies_GetVariantWithHash(const SpeciesVaria
|
||||||
uint32_t hash) {
|
uint32_t hash) {
|
||||||
Try(out = p->GetVariant(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
|
#undef SIMPLE_GET_FUNC
|
|
@ -33,4 +33,4 @@ Gender CreatureSpecies::GetRandomGender(Arbutils::Random& rand) const {
|
||||||
if (val >= this->_genderRate)
|
if (val >= this->_genderRate)
|
||||||
return Gender ::Female;
|
return Gender ::Female;
|
||||||
return Gender ::Male;
|
return Gender ::Male;
|
||||||
}
|
}
|
Loading…
Reference in New Issue