Use foo_simple_name for armor types in xname

This will distinguish between a hat and a helmet, shoes and boots, etc,
so that a "conical hat" doesn't turn into a "helmet called dunce" after
type-naming it, and so on.  Instead, more specific names will be used
for the base type, consistent with the terms used in various messages
(so "a hat called dunce").

Some of these don't seem like necessary distinctions to make, and some
of them probably don't make a difference at all (e.g. gloves vs
gauntlets, since "gauntlets" only shows up once you've IDed the item so
the user-assigned typename isn't visible), but it probably makes sense
to be consistent in using these functions if it's done for any armor
type.
This commit is contained in:
Michael Meyer
2022-12-09 14:41:20 -05:00
committed by PatR
parent 2ee061e02d
commit eff2cba10d

View File

@@ -635,15 +635,15 @@ xname_flags(
Strcat(buf, actualn);
} else if (un) {
if (is_boots(obj))
Strcat(buf, "boots");
Strcat(buf, boots_simple_name(obj));
else if (is_gloves(obj))
Strcat(buf, "gloves");
Strcat(buf, gloves_simple_name(obj));
else if (is_cloak(obj))
Strcpy(buf, "cloak");
Strcpy(buf, cloak_simple_name(obj));
else if (is_helmet(obj))
Strcpy(buf, "helmet");
Strcpy(buf, helm_simple_name(obj));
else if (is_shield(obj))
Strcpy(buf, "shield");
Strcpy(buf, shield_simple_name(obj));
else
Strcpy(buf, "armor");
Strcat(buf, " called ");