Show "[eating]" in top bar when looking at creatures with /
This commit is contained in:
parent
f064ce1c41
commit
301f815ab8
23
io.c
23
io.c
|
@ -830,6 +830,8 @@ cell_t *real_askcoords(char *prompt, char *subprompt, int targettype, lifeform_t
|
||||||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
strcat(extrainfo, "fleeing");
|
strcat(extrainfo, "fleeing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// can only be one of the below things
|
||||||
f = lfhasflag(c->lf, F_ASLEEP);
|
f = lfhasflag(c->lf, F_ASLEEP);
|
||||||
if (f) {
|
if (f) {
|
||||||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
|
@ -866,6 +868,27 @@ cell_t *real_askcoords(char *prompt, char *subprompt, int targettype, lifeform_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f = lfhasflag(c->lf, F_EATING);
|
||||||
|
if (f) {
|
||||||
|
char eatobname[BUFLEN];
|
||||||
|
object_t *eatob;
|
||||||
|
int eatobid;
|
||||||
|
eatobid = atol(f->text);
|
||||||
|
eatob = findobbyid(c->lf->pack, eatobid);
|
||||||
|
if (!eatob) {
|
||||||
|
eatob = findobbyid(c->obpile, eatobid);
|
||||||
|
}
|
||||||
|
if (eatob) {
|
||||||
|
real_getobname(eatob, eatobname, eatob->amt, B_PREMODS, B_NOCONDITION, B_BLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL);
|
||||||
|
} else {
|
||||||
|
strcpy(eatobname, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
|
strcat(extrainfo, "eating ");
|
||||||
|
strcat(extrainfo, eatobname);
|
||||||
|
}
|
||||||
|
|
||||||
if (lfhasflag(c->lf, F_CLIMBING)) {
|
if (lfhasflag(c->lf, F_CLIMBING)) {
|
||||||
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
if (strlen(extrainfo)) strcat(extrainfo, ", ");
|
||||||
strcat(extrainfo, "climbing ");
|
strcat(extrainfo, "climbing ");
|
||||||
|
|
Loading…
Reference in New Issue