From eff2cba10dd2499885b810294c75fa2c5a7c71c4 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 9 Dec 2022 14:41:20 -0500 Subject: [PATCH] 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. --- src/objnam.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index fc9ac3ac6..a990bdbe2 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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 ");