shopkeeper feedback (trunk only)

Use verbalize instead of pline for shop "thank you, scum" message
(From a bug report.  Suppress shop "you sneaky cad" message
when removing a hero-owned pick-axe from a container inside a shop if the
shk is unable to speak; also give it at most one time per move (taking
multiple pick-axes out of a bag at once was way too verbose).  Honor
addtobill's silent flag for the bill overflow message when/if that occurs.

     Also adds a safe_qbuf usage for the #tip command that I had pending
for pickup.c.
This commit is contained in:
nethack.rankin
2006-11-07 02:49:09 +00:00
parent 1e0960f8ef
commit 0a7c5d6ad2
3 changed files with 27 additions and 7 deletions

View File

@@ -1959,8 +1959,7 @@ register struct obj *obj;
obj->oy = current_container->oy;
addtobill(obj, FALSE, FALSE, FALSE);
}
if (is_pick(obj) && !obj->unpaid && *u.ushops && shop_keeper(*u.ushops))
verbalize("You sneaky cad! Get out of here with that pick!");
if (is_pick(obj)) pick_pick(obj); /* shopkeeper feedback */
otmp = addinv(obj);
loadlev = near_capacity();
@@ -2440,7 +2439,7 @@ dotip()
struct obj *cobj, *nobj;
coord cc;
int boxes;
char c, buf[BUFSZ];
char c, buf[BUFSZ], qbuf[BUFSZ];
const char *spillage = 0;
/*
@@ -2463,8 +2462,8 @@ dotip()
nobj = cobj->nexthere;
if (!Is_container(cobj)) continue;
Sprintf(buf, "There is %s here, tip it?", doname(cobj));
c = ynq(buf);
c = ynq(safe_qbuf(qbuf, "There is ", " here, tip it?",
cobj, doname, ansimpleoname, "container"));
if (c == 'q') return 0;
if (c == 'n') continue;