paranoid_confirmation:eating

Add 'eating' (synonym 'continue') to the list of things that can be
set via paranoid_confirmation to require "yes" instead of "y" when
the user is prompted about something, in this case "Continue eating?".

dat/opthelp was missing a few of the paranoid_confirmation choices.
This commit is contained in:
PatR
2019-11-27 16:27:13 -08:00
parent 919f0e82d8
commit 7ca572eb60
6 changed files with 57 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 eat.c $NHDT-Date: 1573346189 2019/11/10 00:36:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.205 $ */
/* NetHack 3.6 eat.c $NHDT-Date: 1574900825 2019/11/28 00:27:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.206 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2875,23 +2875,20 @@ int num;
/* Have lesshungry() report when you're nearly full so all eating
* warns when you're about to choke.
*/
if (u.uhunger >= 1500) {
if (!context.victual.eating
|| (context.victual.eating && !context.victual.fullwarn)) {
pline("You're having a hard time getting all of it down.");
nomovemsg = "You're finally finished.";
if (!context.victual.eating) {
multi = -2;
} else {
context.victual.fullwarn = TRUE;
if (context.victual.canchoke
&& context.victual.reqtime > 1) {
/* a one-gulp food will not survive a stop */
if (yn_function("Continue eating?", ynchars, 'n')
!= 'y') {
reset_eat();
nomovemsg = (char *) 0;
}
if (u.uhunger >= 1500
&& (!context.victual.eating
|| (context.victual.eating && !context.victual.fullwarn))) {
pline("You're having a hard time getting all of it down.");
nomovemsg = "You're finally finished.";
if (!context.victual.eating) {
multi = -2;
} else {
context.victual.fullwarn = TRUE;
if (context.victual.canchoke && context.victual.reqtime > 1) {
/* a one-gulp food will not survive a stop */
if (!paranoid_query(ParanoidEating, "Continue eating?")) {
reset_eat();
nomovemsg = (char *) 0;
}
}
}