Merge branch 'NetHack-3.6.2'
This commit is contained in:
15
src/botl.c
15
src/botl.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1549755174 2019/02/09 23:32:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.134 $ */
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1552697495 2019/03/16 00:51:35 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.135 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -375,13 +375,16 @@ char *buf;
|
||||
int ret = 1;
|
||||
|
||||
/* TODO: Add in dungeon name */
|
||||
if (Is_knox(&u.uz))
|
||||
if (Is_knox(&u.uz)) {
|
||||
Sprintf(buf, "%s ", g.dungeons[u.uz.dnum].dname);
|
||||
else if (In_quest(&u.uz))
|
||||
} else if (In_quest(&u.uz)) {
|
||||
Sprintf(buf, "Home %d ", dunlev(&u.uz));
|
||||
else if (In_endgame(&u.uz))
|
||||
Sprintf(buf, Is_astralevel(&u.uz) ? "Astral Plane " : "End Game ");
|
||||
else {
|
||||
} else if (In_endgame(&u.uz)) {
|
||||
/* [3.6.2: this used to be "Astral Plane" or generic "End Game"] */
|
||||
(void) endgamelevelname(buf, depth(&u.uz));
|
||||
(void) strsubst(buf, "Plane of ", ""); /* just keep <element> */
|
||||
Strcat(buf, " ");
|
||||
} else {
|
||||
/* ports with more room may expand this one */
|
||||
Sprintf(buf, "Dlvl:%-2d ", depth(&u.uz));
|
||||
ret = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 hacklib.c $NHDT-Date: 1518922474 2018/02/18 02:54:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.54 $ */
|
||||
/* NetHack 3.6 hacklib.c $NHDT-Date: 1552639487 2019/03/15 08:44:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2007. */
|
||||
/* Copyright (c) Robert Patrick Rankin, 1991 */
|
||||
@@ -170,13 +170,14 @@ char *bp;
|
||||
return bp;
|
||||
}
|
||||
|
||||
/* remove leading and trailing whitespace, in place */
|
||||
char*
|
||||
/* skip leading whitespace; remove trailing whitespace, in place */
|
||||
char *
|
||||
trimspaces(txt)
|
||||
char* txt;
|
||||
char *txt;
|
||||
{
|
||||
char* end;
|
||||
char *end;
|
||||
|
||||
/* leading whitespace will remain in the buffer */
|
||||
while (*txt == ' ' || *txt == '\t')
|
||||
txt++;
|
||||
end = eos(txt);
|
||||
|
||||
Reference in New Issue
Block a user