Use existing pronoun_type enum

develop
lethosor 2020-08-08 00:12:59 -04:00
parent f7fda8e7f5
commit ee8d130298
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 5 additions and 5 deletions

@ -290,7 +290,7 @@ struct UnitInfo
string transname; string transname;
string profession; string profession;
string goal; string goal;
enum { NEUTRAL, MALE, FEMALE } goal_gender; df::pronoun_type goal_gender;
bool achieved_goal; bool achieved_goal;
int8_t color; int8_t color;
int active_index; int active_index;
@ -1263,9 +1263,9 @@ void viewscreen_unitlaborsst::refreshNames()
cur->goal = Units::getGoalName(unit); cur->goal = Units::getGoalName(unit);
df::goal_type goal = Units::getGoalType(unit); df::goal_type goal = Units::getGoalType(unit);
if (goal == df::goal_type::START_A_FAMILY) { if (goal == df::goal_type::START_A_FAMILY) {
cur->goal_gender = Units::isFemale(unit) ? UnitInfo::FEMALE : UnitInfo::MALE; cur->goal_gender = unit->sex;
} else { } else {
cur->goal_gender = UnitInfo::NEUTRAL; cur->goal_gender = df::pronoun_type::it;
} }
cur->achieved_goal = Units::isGoalAchieved(unit); cur->achieved_goal = Units::isGoalAchieved(unit);
@ -2021,13 +2021,13 @@ void viewscreen_unitlaborsst::render()
fg = cur->color; fg = cur->color;
detail_str = cur->profession; detail_str = cur->profession;
} else { } else {
if (cur->goal_gender == UnitInfo::NEUTRAL) { if (cur->goal_gender == df::pronoun_type::it) {
if (cur->achieved_goal) { if (cur->achieved_goal) {
fg = COLOR_LIGHTGREEN; fg = COLOR_LIGHTGREEN;
} else { } else {
fg = COLOR_BROWN; fg = COLOR_BROWN;
} }
} else if (cur->goal_gender == UnitInfo::FEMALE) { } else if (cur->goal_gender == df::pronoun_type::she) {
if (cur->achieved_goal) { if (cur->achieved_goal) {
fg = COLOR_LIGHTRED; fg = COLOR_LIGHTRED;
} }