Add function to set variants for a species, and a function to get the count of species in a species library.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
e45a36d78e
commit
925763752f
|
@ -39,6 +39,8 @@ namespace CreatureLib::Library {
|
||||||
[[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
|
[[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
|
||||||
[[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
|
[[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
|
||||||
[[nodiscard]] const std::string& GetName() const;
|
[[nodiscard]] const std::string& GetName() const;
|
||||||
|
|
||||||
|
void SetVariant(const std::string& name, const SpeciesVariant* variant) { _variants[name] = variant; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ namespace CreatureLib::Library {
|
||||||
|
|
||||||
void LoadSpecies(const std::string& name, const CreatureSpecies* species);
|
void LoadSpecies(const std::string& name, const CreatureSpecies* species);
|
||||||
void DeleteSpecies(const std::string& name);
|
void DeleteSpecies(const std::string& name);
|
||||||
|
|
||||||
|
size_t GetCount() const { return _species.count(); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue