gui2/unit_create: Use variation_name before the variation's ut name
Forgot that variation_name has an actual meaning when paired with variation_id as opposed to it just being a deprecated form of variation_id. This makes it so it's favoured by the UI over a potentially overridden type name when present. This makes it so the mainline Walking Corpse and Soulless units have their translatable variation names properly displayed.
This commit is contained in:
parent
fe5f748088
commit
bd676edfae
1 changed files with 3 additions and 1 deletions
|
@ -240,7 +240,9 @@ void unit_create::list_item_clicked(window& window)
|
|||
const unit_type& uv = pair.second;
|
||||
|
||||
std::string uv_label;
|
||||
if(!uv.type_name().empty() && uv.type_name() != ut.type_name()) {
|
||||
if(!uv.variation_name().empty()) {
|
||||
uv_label = uv.variation_name() + " (" + uv_id + ")";
|
||||
} else if(!uv.type_name().empty() && uv.type_name() != ut.type_name()) {
|
||||
uv_label = uv.type_name() + " (" + uv_id + ")";
|
||||
} else {
|
||||
uv_label = uv_id;
|
||||
|
|
Loading…
Add table
Reference in a new issue