Skip to content

Commit

Permalink
Fix up female_text= especially in [unstore_unit], update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Aug 18, 2015
1 parent 3564b88 commit 766f3a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -36,6 +36,7 @@ Version 1.13.1+dev:
* Added support for has_flag= in terrain graphics [variant].
* Added category= to [label] - allows grouping labels so that players can
show/hide them
* Add female_text= to [animate_unit] and [unstore_unit] for easier translating
* Editor:
* Added Category field and color sliders to the Edit Label panel.
* Miscellaneous and bug fixes:
Expand Down
2 changes: 1 addition & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -1684,7 +1684,7 @@ WML_HANDLER_FUNCTION(unstore_unit, /*event_info*/, cfg)
resources::units->erase(loc);
resources::units->add(loc, *u);

config::attribute_value text = cfg["gender"].str() == "female" ? cfg["female_text"] : cfg["text"];
config::attribute_value text = var["gender"].str() == "female" ? cfg["female_text"] : cfg["male_text"];
if(text.blank()) {
text = cfg["text"];
}
Expand Down
3 changes: 1 addition & 2 deletions src/unit_display.cpp
Expand Up @@ -868,11 +868,10 @@ void wml_animation_internal(unit_animator &animator, const vconfig &cfg, const m
secondary_loc = u->get_location().get_direction(dir);
}
}
config::attribute_value text = u->gender() == unit_race::FEMALE ? cfg["female_text"] : cfg["text"];
config::attribute_value text = u->gender() == unit_race::FEMALE ? cfg["female_text"] : cfg["male_text"];
if(text.blank()) {
text = cfg["text"];
}
const std::string text_key = u->gender() == unit_race::FEMALE ? "female_text" : "text";
animator.add_animation(&*u, cfg["flag"], u->get_location(),
secondary_loc, cfg["value"], cfg["with_bars"].to_bool(),
text.str(), text_color, hits, primary, secondary,
Expand Down

0 comments on commit 766f3a7

Please sign in to comment.