grammar fix for "That walking shoes is really a small mimic"

This commit is contained in:
nhmall
2019-10-19 12:05:33 -04:00
parent 46225955bc
commit c099e0a1ff
4 changed files with 44 additions and 2 deletions

View File

@@ -200,6 +200,8 @@ in a shop which doesn't care about tools: You drop a <box> containing 1 item.
<Shk> offers you <gold> for your items in your <box>. Sell them?
[plural 'items' and 'them' were including the box along with the one
item in it even though shk was only offering to buy its contents]
grammar correction for "That walking shoes is really a small mimic" when
applying a stethoscope
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository

View File

@@ -1379,6 +1379,7 @@ E struct obj *FDECL(obj_nexto_xy, (struct obj *, int, int, BOOLEAN_P));
E struct obj *FDECL(obj_absorb, (struct obj **, struct obj **));
E struct obj *FDECL(obj_meld, (struct obj **, struct obj **));
E void FDECL(pudding_merge_message, (struct obj *, struct obj *));
E struct obj *FDECL(init_dummyobj, (struct obj *, SHORT_P, long));
/* ### mkroom.c ### */

View File

@@ -383,10 +383,15 @@ register struct obj *obj;
newsym(mtmp->mx, mtmp->my);
} else if (mtmp->mappearance) {
const char *what = "thing";
boolean use_plural = FALSE;
struct obj dummyobj, *odummy;
switch (M_AP_TYPE(mtmp)) {
case M_AP_OBJECT:
what = simple_typename(mtmp->mappearance);
odummy = init_dummyobj(&dummyobj, mtmp->mappearance, 1L);
what = simple_typename(odummy->otyp);
use_plural = (is_boots(odummy) || is_gloves(odummy)
|| odummy->otyp == LENSES);
break;
case M_AP_MONSTER: /* ignore Hallucination here */
what = mons[mtmp->mappearance].mname;
@@ -396,7 +401,9 @@ register struct obj *obj;
break;
}
seemimic(mtmp);
pline("That %s is really %s.", what, mnm);
pline("%s %s %s really %s.",
use_plural ? "Those" : "That", what,
use_plural ? "are" : "is", mnm);
} else if (flags.verbose && !canspotmon(mtmp)) {
There("is %s there.", mnm);
}

View File

@@ -2470,6 +2470,38 @@ struct monst *mon;
}
}
/*
* Initialize a dummy obj with just enough info
* to allow some of the tests in obj.h that
* take an obj pointer to work.
*
*/
struct obj *
init_dummyobj(obj, otyp, oquan)
struct obj *obj;
short otyp;
long oquan;
{
if (obj) {
*obj = zeroobj;
obj->otyp = otyp;
obj->oclass = objects[otyp].oc_class;
/* obj->dknown = 0; */
/* suppress known except for amulets (needed for fakes and real A-of-Y) */
obj->known = (obj->oclass == AMULET_CLASS)
? obj->known
/* default is "on" for types which don't use it */
: !objects[otyp].oc_uses_known;
obj->quan = oquan ? oquan : 1L;
obj->corpsenm = NON_PM; /* suppress statue and figurine details */
/* but suppressing fruit details leads to "bad fruit #0"
[perhaps we should force "slime mold" rather than use xname?] */
if (obj->otyp == SLIME_MOLD)
obj->spe = 1;
}
return obj;
}
/* obj sanity check: check objects inside container */
STATIC_OVL void
check_contained(container, mesg)