removed support for turning genders off
This commit is contained in:
parent
951473c72e
commit
2df6db8c54
3 changed files with 1 additions and 20 deletions
|
@ -67,7 +67,6 @@ manager::manager()
|
|||
|
||||
set_colour_cursors(prefs["colour_cursors"] == "yes");
|
||||
set_show_haloes(prefs["show_haloes"] != "no");
|
||||
set_show_unit_genders(prefs["unit_genders"] != "no");
|
||||
|
||||
std::vector<std::string> v;
|
||||
v = config::split(prefs["encountered_units"]);
|
||||
|
@ -705,17 +704,6 @@ void set_show_haloes(bool value)
|
|||
prefs["show_haloes"] = value ? "yes" : "no";
|
||||
}
|
||||
|
||||
bool show_unit_genders()
|
||||
{
|
||||
return unit_genders;
|
||||
}
|
||||
|
||||
void set_show_unit_genders(bool value)
|
||||
{
|
||||
prefs["unit_genders"] = value ? "yes" : "no";
|
||||
unit_genders = value;
|
||||
}
|
||||
|
||||
std::set<std::string> &encountered_units() {
|
||||
return encountered_units_set;
|
||||
}
|
||||
|
|
|
@ -146,9 +146,6 @@ namespace preferences {
|
|||
bool show_haloes();
|
||||
void set_show_haloes(bool value);
|
||||
|
||||
bool show_unit_genders();
|
||||
void set_show_unit_genders(bool value);
|
||||
|
||||
std::set<std::string> &encountered_units();
|
||||
std::set<std::string> &encountered_terrains();
|
||||
|
||||
|
|
|
@ -65,10 +65,6 @@ unit::unit(const game_data& data, const config& cfg) : state_(STATE_NORMAL),
|
|||
|
||||
unit_race::GENDER unit::generate_gender(const unit_type& type, bool gen)
|
||||
{
|
||||
if(preferences::show_unit_genders() == false) {
|
||||
gen = false;
|
||||
}
|
||||
|
||||
const std::vector<unit_race::GENDER>& genders = type.genders();
|
||||
if(genders.empty() == false) {
|
||||
return gen ? genders[get_random()%genders.size()] : genders.front();
|
||||
|
@ -621,7 +617,7 @@ void unit::read(const game_data& data, const config& cfg)
|
|||
|
||||
wassert(type_ != NULL);
|
||||
|
||||
const std::string& gender = preferences::show_unit_genders() ? cfg["gender"] : "";
|
||||
const std::string& gender = cfg["gender"];
|
||||
if(gender == "male") {
|
||||
gender_ = unit_race::MALE;
|
||||
} else if(gender == "female") {
|
||||
|
|
Loading…
Add table
Reference in a new issue