Update to newer CreatureLib.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d50926afba
commit
41b15dc693
|
@ -15,7 +15,7 @@ export uint8_t PkmnLib_NatureLibrary_GetNatureByName(NatureLibrary* p, const cha
|
||||||
}
|
}
|
||||||
|
|
||||||
export const char* PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand) {
|
export const char* PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand) {
|
||||||
return p->GetRandomNatureName(rand).c_str();
|
return p->GetRandomNatureName(*rand).c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {
|
export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ PkmnLib::Battling::Pokemon* PkmnLib::Battling::CreatePokemon::Build() {
|
||||||
AssertNotNull(forme);
|
AssertNotNull(forme);
|
||||||
CreatureLib::Library::TalentIndex ability;
|
CreatureLib::Library::TalentIndex ability;
|
||||||
if (this->_ability.Empty()) {
|
if (this->_ability.Empty()) {
|
||||||
ability = forme->GetRandomTalent(&rand);
|
ability = forme->GetRandomTalent(rand);
|
||||||
} else {
|
} else {
|
||||||
ability = forme->GetTalentIndex(this->_ability);
|
ability = forme->GetTalentIndex(this->_ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,6 @@ namespace PkmnLib::Library {
|
||||||
auto i = rand.Get(_items.size());
|
auto i = rand.Get(_items.size());
|
||||||
return std::next(std::begin(_items), i)->first;
|
return std::next(std::begin(_items), i)->first;
|
||||||
}
|
}
|
||||||
inline const ArbUt::StringView& GetRandomNatureName(ArbUt::Random* rand) const {
|
|
||||||
auto i = rand->Get(_items.size());
|
|
||||||
return std::next(std::begin(_items), i)->first;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ArbUt::StringView GetNatureName(ArbUt::BorrowedPtr<const Nature> nature) {
|
inline ArbUt::StringView GetNatureName(ArbUt::BorrowedPtr<const Nature> nature) {
|
||||||
for (const auto& v : _items) {
|
for (const auto& v : _items) {
|
||||||
|
|
Loading…
Reference in New Issue