From: nethack.allison Date: Mon, 7 Jan 2002 12:35:06 +0000 (+0000) Subject: This adds Wingnut's auto-credit patch (except it doesn't use a separate X-Git-Tag: MOVE2GIT~3531 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59f5ed1cbb2f029ce399637f423aaa141330c8eb;p=nethack This adds Wingnut's auto-credit patch (except it doesn't use a separate auto_credit flag; that's what sell_response is for). follow-up comment from Pat: This introduces behavior that I consider to be buggy. You need something separate from sell_response, otherwise if you answer (a)ll when the shopkeeper still has money you end up selling everything for credit without being asked when he runs out of cash in the middle of the transation. Avoiding that is the reason for the old behavior in the first place. --- diff --git a/doc/fixes33.2 b/doc/fixes33.2 index 5944b039e..7c2715273 100644 --- a/doc/fixes33.2 +++ b/doc/fixes33.2 @@ -368,6 +368,7 @@ glass objects should break when thrown, just like when kicked in chests rocks/gems shouldn't be hard to throw by hand because they are ammo avoid all cases where splitting an object would result in two objects being quivered, wielded or otherwise having its owornflag set +allow 'a' prompt when dropping many objects in shop for credit (Wingnut) Platform- and/or Interface-Specific Fixes diff --git a/src/shk.c b/src/shk.c index f9f464bfc..d442bf0b3 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2622,7 +2622,7 @@ move_on: char c, qbuf[BUFSZ]; long tmpcr = ((offer * 9L) / 10L) + (offer <= 1L); - if (sell_how == SELL_NORMAL) { + if (sell_how == SELL_NORMAL || sell_response == 'y') { c = sell_response = 'y'; } else if (sell_response != 'n') { pline("%s cannot pay you at present.", Monnam(shkp)); @@ -2630,7 +2630,13 @@ move_on: "Will you accept %ld zorkmid%s in credit for %s?", tmpcr, plur(tmpcr), doname(obj)); /* won't accept 'a' response here */ - c = ynq(qbuf); + /* KLY - 3/2000 yes, we will, it's a damn nuisance + to have to constantly hit 'y' to sell for credit */ + c = ynaq(qbuf); + if (c == 'a') { + c = 'y'; + sell_response = 'y'; + } } else /* previously specified "quit" */ c = 'n';