Unit Type: implement helper to get whether a type has a specific gender variation

This commit is contained in:
Charles Dang 2016-09-06 09:46:50 +11:00
parent 5d6fe12ca3
commit 41b254da31

View file

@ -198,6 +198,11 @@ public:
/// The returned vector will not be empty, provided this has been built
/// to the HELP_INDEXED status.
const std::vector<unit_race::GENDER>& genders() const { return genders_; }
const bool has_gender_variation(unit_race::GENDER gender) const
{
return std::find(genders_.begin(), genders_.end(), gender) != genders_.end();
}
std::vector<std::string> variations() const;
const variations_map& variation_types() const {return variations_; }