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 pray.c $NHDT-Date: 1727250729 2024/09/25 07:52:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.220 $ */
|
||||
/* NetHack 3.7 pray.c $NHDT-Date: 1762680996 2025/11/09 01:36:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.244 $ */
|
||||
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2207,12 +2207,12 @@ dopray(void)
|
||||
if (ParanoidPray) {
|
||||
ok = paranoid_query(ParanoidConfirm,
|
||||
"Are you sure you want to pray?");
|
||||
|
||||
#if 0
|
||||
/* clear command recall buffer; otherwise ^A to repeat p(ray) would
|
||||
do so without confirmation (if 'ok') or do nothing (if '!ok') */
|
||||
cmdq_clear(CQ_REPEAT);
|
||||
cmdq_add_ec(CQ_REPEAT, dopray);
|
||||
|
||||
#endif
|
||||
if (!ok) /* declined the "are you sure?" confirmation */
|
||||
return ECMD_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user