From: nethack.rankin Date: Sat, 23 Jul 2011 03:53:09 +0000 (+0000) Subject: shop credit feedback (trunk only) X-Git-Tag: MOVE2GIT~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=236c3524d2183a9accac68ec8d37a7a33fb90a95;p=nethack shop credit feedback (trunk only) Fix the first of a couple of minor things I noticed when viewing that guy's ttyrec about a hidden inventory item which turned out to be scrolls of scare monster on the used-up items section of his shop bill. Be more precise when a shopkeeper gives the hero credit for dropped gold. Instead of just displaying N zorkmids are added to your credit. show either You have established N zorkmids credit. when you had no previous credit, or N zorkmids added to your credit; total is now X zorkmids. when adding to existing credit. --- diff --git a/src/shk.c b/src/shk.c index cc7d53d21..d6992b666 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2722,11 +2722,16 @@ xchar x, y; eshkp->loan = 0L; Your("debt is paid off."); } - pline("%ld %s %s added to your credit.", - delta, currency(delta), delta > 1L ? "are" : "is"); + if (eshkp->credit == delta) + You("have established %ld %s credit.", + delta, currency(delta)); + else + pline("%ld %s added to your credit; total is now %ld %s.", + delta, currency(delta), + eshkp->credit, currency(eshkp->credit)); } - if(offer) goto move_on; - else { + + if (!offer) { if(!isgold) { if (container) dropped_container(obj, shkp, FALSE); @@ -2736,7 +2741,7 @@ xchar x, y; return; } } -move_on: + if((!saleitem && !(container && cltmp > 0L)) || eshkp->billct == BILLSZ || obj->oclass == BALL_CLASS