Add paranoid option for breaking a wand
Add OPTION=paranoid_confirm:wand to prevent accidental wand breaking - suggested by scorchgeek
This commit is contained in:
@@ -2271,6 +2271,8 @@ require "yes" rather than 'y' to confirm attacking a peaceful monster;
|
|||||||
.PL pray
|
.PL pray
|
||||||
require 'y' to confirm an attempt to pray rather
|
require 'y' to confirm an attempt to pray rather
|
||||||
than immediately praying; on by default;
|
than immediately praying; on by default;
|
||||||
|
.PL wand
|
||||||
|
require "yes" rather than 'y' to confirm breaking a wand;
|
||||||
.PL Remove
|
.PL Remove
|
||||||
require selection from inventory for 'R' and 'T'
|
require selection from inventory for 'R' and 'T'
|
||||||
commands even when wearing just one applicable item.
|
commands even when wearing just one applicable item.
|
||||||
|
|||||||
@@ -2728,6 +2728,9 @@ a peaceful monster;
|
|||||||
\item[{\tt pray~~~}]
|
\item[{\tt pray~~~}]
|
||||||
require `{\tt y}' to confirm an attempt to pray rather
|
require `{\tt y}' to confirm an attempt to pray rather
|
||||||
than immediately praying; on by default;
|
than immediately praying; on by default;
|
||||||
|
\item[{\tt wand}]
|
||||||
|
require ``{\tt yes}'' rather than `{\tt y}' to confirm breaking
|
||||||
|
a wand;
|
||||||
\item[{\tt Remove~}] require selection from inventory for `{\tt R}' and `{\tt T}'
|
\item[{\tt Remove~}] require selection from inventory for `{\tt R}' and `{\tt T}'
|
||||||
commands even when wearing just one applicable item.
|
commands even when wearing just one applicable item.
|
||||||
\elist
|
\elist
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ struct flag {
|
|||||||
#define PARANOID_HIT 0x10
|
#define PARANOID_HIT 0x10
|
||||||
#define PARANOID_PRAY 0x20
|
#define PARANOID_PRAY 0x20
|
||||||
#define PARANOID_REMOVE 0x40
|
#define PARANOID_REMOVE 0x40
|
||||||
|
#define PARANOID_BREAKWAND 0x80
|
||||||
int pickup_burden; /* maximum burden before prompt */
|
int pickup_burden; /* maximum burden before prompt */
|
||||||
int pile_limit; /* controls feedback when walking over objects */
|
int pile_limit; /* controls feedback when walking over objects */
|
||||||
char inv_order[MAXOCLASSES];
|
char inv_order[MAXOCLASSES];
|
||||||
@@ -378,6 +379,8 @@ extern NEARDATA struct instance_flags iflags;
|
|||||||
/* remove: remove ('R') and takeoff ('T') commands prompt for an inventory
|
/* remove: remove ('R') and takeoff ('T') commands prompt for an inventory
|
||||||
item even when only one accessory or piece of armor is currently worn */
|
item even when only one accessory or piece of armor is currently worn */
|
||||||
#define ParanoidRemove ((flags.paranoia_bits & PARANOID_REMOVE) != 0)
|
#define ParanoidRemove ((flags.paranoia_bits & PARANOID_REMOVE) != 0)
|
||||||
|
/* breakwand: Applying a wand */
|
||||||
|
#define ParanoidBreakwand ((flags.paranoia_bits & PARANOID_BREAKWAND) != 0)
|
||||||
|
|
||||||
/* command parsing, mainly dealing with number_pad handling;
|
/* command parsing, mainly dealing with number_pad handling;
|
||||||
not saved and restored */
|
not saved and restored */
|
||||||
|
|||||||
+3
-2
@@ -3065,8 +3065,9 @@ struct obj *obj;
|
|||||||
char confirm[QBUFSZ], buf[BUFSZ];
|
char confirm[QBUFSZ], buf[BUFSZ];
|
||||||
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
|
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
|
||||||
|
|
||||||
if (yn(safe_qbuf(confirm, "Are you really sure you want to break ", "?",
|
if (!paranoid_query(ParanoidBreakwand,
|
||||||
obj, yname, ysimple_name, "the wand")) == 'n')
|
safe_qbuf(confirm, "Are you really sure you want to break ",
|
||||||
|
"?", obj, yname, ysimple_name, "the wand")))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (nohands(youmonst.data)) {
|
if (nohands(youmonst.data)) {
|
||||||
|
|||||||
@@ -1186,6 +1186,8 @@ STATIC_VAR const struct paranoia_opts {
|
|||||||
"y to pray (supersedes old \"prayconfirm\" option)" },
|
"y to pray (supersedes old \"prayconfirm\" option)" },
|
||||||
{ PARANOID_REMOVE, "Remove", 1, "Takeoff", 1,
|
{ PARANOID_REMOVE, "Remove", 1, "Takeoff", 1,
|
||||||
"always pick from inventory for Remove and Takeoff" },
|
"always pick from inventory for Remove and Takeoff" },
|
||||||
|
{ PARANOID_BREAKWAND, "wand", 1, "breakwand", 2,
|
||||||
|
"yes vs y to break a wand" },
|
||||||
/* for config file parsing; interactive menu skips these */
|
/* for config file parsing; interactive menu skips these */
|
||||||
{ 0, "none", 4, 0, 0, 0 }, /* require full word match */
|
{ 0, "none", 4, 0, 0, 0 }, /* require full word match */
|
||||||
{ ~0, "all", 3, 0, 0, 0 }, /* ditto */
|
{ ~0, "all", 3, 0, 0, 0 }, /* ditto */
|
||||||
|
|||||||
Reference in New Issue
Block a user