fix B11001 - fruit name quibbling
> OK, it's "grape juice" now, but it's still "bunch of grapes farm".
This commit is contained in:
15
src/objnam.c
15
src/objnam.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)objnam.c 3.4 2002/08/18 */
|
||||
/* SCCS Id: @(#)objnam.c 3.4 2002/09/08 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -212,17 +212,18 @@ char *FDECL((*func), (OBJ_P));
|
||||
/* convert player specified fruit name into corresponding fruit juice name
|
||||
("slice of pizza" -> "pizza juice" rather than "slice of pizza juice") */
|
||||
char *
|
||||
fruitjuice()
|
||||
fruitname(juice)
|
||||
boolean juice; /* whether or not to append " juice" to the name */
|
||||
{
|
||||
char *buf = nextobuf();
|
||||
const char *juice = strstri(pl_fruit, " of ");
|
||||
const char *fruit_nam = strstri(pl_fruit, " of ");
|
||||
|
||||
if (juice)
|
||||
juice += 4; /* skip past " of " */
|
||||
if (fruit_nam)
|
||||
fruit_nam += 4; /* skip past " of " */
|
||||
else
|
||||
juice = pl_fruit; /* use it as is */
|
||||
fruit_nam = pl_fruit; /* use it as is */
|
||||
|
||||
Sprintf(buf, "%s juice", makesingular(juice));
|
||||
Sprintf(buf, "%s%s", makesingular(fruit_nam), juice ? " juice" : "");
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user