From fa890fc7a227cbfd7bffec25f370b6f0fe456bae Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 21 Jan 2020 15:11:59 -0800 Subject: [PATCH] wielded tin opener For simplified weapon description (used by ^X and a few other places), show "tin opener" instead of generic "tool" for that item since there are cases where it is expected to be wielded. Also, don't describe a wielded "glob of " as "food". --- src/weapon.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/weapon.c b/src/weapon.c index e61a7438f..d55f8e4e9 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 weapon.c $NHDT-Date: 1559998716 2019/06/08 12:58:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.70 $ */ +/* NetHack 3.6 weapon.c $NHDT-Date: 1579648295 2020/01/21 23:11:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.82 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -95,13 +95,17 @@ struct obj *obj; switch (skill) { case P_NONE: /* not a weapon or weptool: use item class name; - override class name "food" for corpses, tins, and eggs, - "large rock" for statues and boulders, and "tool" for towels */ + override class name for things where it sounds strange and + for things that aren't unexpected to find being wielded: + corpses, tins, eggs, and globs avoid "food", + statues and boulders avoid "large rock", + and towels and tin openers avoid "tool" */ descr = (obj->otyp == CORPSE || obj->otyp == TIN || obj->otyp == EGG || obj->otyp == STATUE || obj->otyp == BOULDER - || obj->otyp == TOWEL) - ? OBJ_NAME(objects[obj->otyp]) - : def_oc_syms[(int) obj->oclass].name; + || obj->otyp == TOWEL || obj->otyp == TIN_OPENER) + ? OBJ_NAME(objects[obj->otyp]) + : obj->globby ? "glob" + : def_oc_syms[(int) obj->oclass].name; break; case P_SLING: if (is_ammo(obj))