artifact name formatting bit
All the quest artifacts are named "The <something> of <someone>". Change xname() to force "the" instead of "The" when that occurs in the middle of "a skeleton key named The Master Key of Thievery" or "a pair of lenses named The Eyes of the Overworld". This change isn't applied to user-assigned names; they're used as-is.
This commit is contained in:
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.933 $ $NHDT-Date: 1654205933 2022/06/02 21:38:53 $
|
HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.939 $ $NHDT-Date: 1654557302 2022/06/06 23:15:02 $
|
||||||
|
|
||||||
General Fixes and Modified Features
|
General Fixes and Modified Features
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@@ -917,6 +917,8 @@ if player gave a subset count when removing an item from a container, then got
|
|||||||
stacks of gold inside a container
|
stacks of gold inside a container
|
||||||
two-handed weapon message stated "welds to monster's hand" instead of
|
two-handed weapon message stated "welds to monster's hand" instead of
|
||||||
"welds to monster's hands"
|
"welds to monster's hands"
|
||||||
|
when formatting an object, avoid capitalization of "The" in "<item> named
|
||||||
|
The <quest-artifact>"
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 objnam.c $NHDT-Date: 1654200083 2022/06/02 20:01:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.366 $ */
|
/* NetHack 3.7 objnam.c $NHDT-Date: 1654557302 2022/06/06 23:15:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.368 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -501,8 +501,8 @@ xname_flags(
|
|||||||
{
|
{
|
||||||
register char *buf;
|
register char *buf;
|
||||||
char *obufp;
|
char *obufp;
|
||||||
register int typ = obj->otyp;
|
int typ = obj->otyp;
|
||||||
register struct objclass *ocl = &objects[typ];
|
struct objclass *ocl = &objects[typ];
|
||||||
int nn = ocl->oc_name_known, omndx = obj->corpsenm;
|
int nn = ocl->oc_name_known, omndx = obj->corpsenm;
|
||||||
const char *actualn = OBJ_NAME(*ocl);
|
const char *actualn = OBJ_NAME(*ocl);
|
||||||
const char *dn = OBJ_DESCR(*ocl);
|
const char *dn = OBJ_DESCR(*ocl);
|
||||||
@@ -873,7 +873,11 @@ xname_flags(
|
|||||||
if (has_oname(obj) && dknown) {
|
if (has_oname(obj) && dknown) {
|
||||||
Strcat(buf, " named ");
|
Strcat(buf, " named ");
|
||||||
nameit:
|
nameit:
|
||||||
|
obufp = eos(buf);
|
||||||
Strcat(buf, ONAME(obj));
|
Strcat(buf, ONAME(obj));
|
||||||
|
/* downcase "The" in "<quest-artifact-item> named The ..." */
|
||||||
|
if (obj->oartifact && !strncmp(obufp, "The ", 4))
|
||||||
|
*obufp = lowc(*obufp); /* = 't'; */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmpi(buf, "the ", 4))
|
if (!strncmpi(buf, "the ", 4))
|
||||||
|
|||||||
Reference in New Issue
Block a user