paranoid_confirmation [expanded user patch] (trunk only; 2 of 2)

[Short writeup; see 'cvs log' of flag.h or options.c for the long one.]

     This is a reworking of user contributed patch known as Paranoid_Quit.

     Add a new compound option, paranoid_confirmation, accepting a space
separated list of values "quit die attack pray Remove"; default is "pray".
paranoid:quit   - yes vs y for "really quit?" and "enter explore mode?"
paranoid:die    - yes vs y for "die?" in explore mode or wizard mode
paranoid:attack - yes vs y for "really attack <peacful monster>?"
paranoid:pray   - y to pray; supersedes prayconfirm boolean; on by default
paranoid:Remove - always issue an inventory prompt for 'R' an 'T', even
  when only one applicable item is currently worn.
This commit is contained in:
nethack.rankin
2011-03-05 10:09:48 +00:00
parent fa6098bfd4
commit 2ec7b5d2f6
11 changed files with 126 additions and 35 deletions

View File

@@ -298,7 +298,7 @@ int sig_unused;
int
done2()
{
if(yn("Really quit?") == 'n') {
if (!paranoid_query(ParanoidQuit, "Really quit?")) {
#ifndef NO_SIGNAL
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
#endif
@@ -865,7 +865,7 @@ int how;
wizard ||
#endif
discover) && (how <= GENOCIDED)) {
if(yn("Die?") == 'y') goto die;
if (paranoid_query(ParanoidDie, "Die?")) goto die;
pline("OK, so you don't %s.",
(how == CHOKING) ? "choke" : "die");
savelife(how);