When describing an object fmor a shop, show its real (identified) name.
This commit is contained in:
parent
4994faa11b
commit
3dd52fa511
6
io.c
6
io.c
|
@ -4344,7 +4344,11 @@ void describeob(object_t *o) {
|
|||
cls();
|
||||
|
||||
// title
|
||||
getobname(o, buf,o->amt);
|
||||
if (pileisinshop(o->pile)) {
|
||||
getobnametrue(o, buf,o->amt);
|
||||
} else {
|
||||
getobname(o, buf,o->amt);
|
||||
}
|
||||
wattron(mainwin, A_BOLD);
|
||||
mvwprintw(mainwin, 0, 0, buf);
|
||||
wattroff(mainwin, A_BOLD);
|
||||
|
|
15
objects.c
15
objects.c
|
@ -1418,7 +1418,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
canstack = B_FALSE;
|
||||
}
|
||||
|
||||
if (where->parentob && hasflag(where->parentob->flags, F_SHOP)) {
|
||||
if (pileisinshop(where)) {
|
||||
if (db) dblog("DB: setting canstack = false, object is going into a shop");
|
||||
canstack = B_FALSE;
|
||||
wantblessknown = B_TRUE;
|
||||
|
@ -8303,6 +8303,11 @@ int isheatable(object_t *o) {
|
|||
}
|
||||
|
||||
int isknown(object_t *o) {
|
||||
// objects in shops are always fully known.
|
||||
if (pileisinshop(o->pile)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
// if id'd, return the full name
|
||||
if (hasflag(o->flags, F_IDENTIFIED)) {
|
||||
return B_TRUE;
|
||||
|
@ -10185,6 +10190,7 @@ int obhpknown(object_t *o) {
|
|||
return showfullhp;
|
||||
}
|
||||
|
||||
|
||||
enum DAMTYPE oblastdamtype(object_t *o) {
|
||||
flag_t *f;
|
||||
f = hasflag(o->flags, F_LASTDAMTYPE);
|
||||
|
@ -12613,6 +12619,13 @@ int pilehasletter(obpile_t *op, char let) {
|
|||
return found;
|
||||
}
|
||||
|
||||
int pileisinshop(obpile_t *op) {
|
||||
if (op && op->parentob && hasflag(op->parentob->flags, F_SHOP)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
return B_FALSE;
|
||||
}
|
||||
|
||||
int pour(lifeform_t *lf, object_t *o) {
|
||||
char buf[BUFLEN],obname[BUFLEN],lfname[BUFLEN],dstname[BUFLEN];
|
||||
int playercansee;
|
||||
|
|
|
@ -301,6 +301,7 @@ void obtodancing(lifeform_t *newlf, object_t *o);
|
|||
int operate(lifeform_t *lf, object_t *o, cell_t *where);
|
||||
enum RARITY pickrr(int whatfor);
|
||||
int pilehasletter(obpile_t *op, char let);
|
||||
int pileisinshop(obpile_t *op);
|
||||
void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE potlessed, int *seen);
|
||||
int pour(lifeform_t *lf, object_t *o);
|
||||
void quaff(lifeform_t *lf, object_t *o);
|
||||
|
|
Loading…
Reference in New Issue