do-again vs yn_function()
This fixes the impossible from yn_function() for ^A after Z. One call to yn_function stored the spell letter for do-again and then another call was unintentionally using that when getting a y/n response for askchain() while using menustyle:Traditional [when spell was identify and eligible objects needed confirmation about whether to be ID'd]. Fixing that seemed to break #pray so the paranoid_confirm routine has been changed to not rely on canned input, even for queries where the player hasn't specified that confirmation be required. Behavior of ^A might be different in unexpected ways, but it wasn't working correctly before.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 invent.c $NHDT-Date: 1737384766 2025/01/20 06:52:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.531 $ */
|
||||
/* NetHack 3.7 invent.c $NHDT-Date: 1762680996 2025/11/09 01:36:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.543 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2445,8 +2445,11 @@ askchain(
|
||||
ininv ? safeq_xprname : doname,
|
||||
ininv ? safeq_shortxprname : ansimpleoname,
|
||||
"item");
|
||||
sym = (takeoff || ident || otmp->quan < 2L) ? nyaq(qbuf)
|
||||
: nyNaq(qbuf);
|
||||
/* nyaq(qbuf) or nyNaq(qbuf), bypassing canned input for ^A */
|
||||
sym = yn_function(qbuf,
|
||||
(takeoff || ident || otmp->quan < 2L)
|
||||
? ynaqchars : ynNaqchars,
|
||||
'n', FALSE);
|
||||
} else
|
||||
sym = 'y';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user