B02005 and B02006
B02006 autopickup_exception documentation >Should the documentation say what priority order is used if two conflict? >(For example, how ">*orcish" and "<*arrow" handle an orcish arrow; from >experimentation, > always takes precedent over < , but I could be >missing something.) B02005 autopickup_exception option menu > It'd be nice if you were returned to the menu after adding an exception > via O so that you can set several with one command.
This commit is contained in:
@@ -2362,6 +2362,7 @@ autopickup_exception=">* cursed*"
|
|||||||
The first example above will result in autopickup of any type of arrow.
|
The first example above will result in autopickup of any type of arrow.
|
||||||
The second example results in the exclusion of any corpse from autopickup.
|
The second example results in the exclusion of any corpse from autopickup.
|
||||||
The last example results in the exclusion of items known to be cursed from autopickup.
|
The last example results in the exclusion of items known to be cursed from autopickup.
|
||||||
|
A `never pickup' rule takes precedence over an `always pickup' rule if both match.
|
||||||
.hn 2
|
.hn 2
|
||||||
Configuring User Sounds
|
Configuring User Sounds
|
||||||
.pg
|
.pg
|
||||||
|
|||||||
+2
-1
@@ -27,7 +27,7 @@
|
|||||||
\begin{document}
|
\begin{document}
|
||||||
%
|
%
|
||||||
% input file: guidebook.mn
|
% input file: guidebook.mn
|
||||||
% $Revision: 1.79 $ $Date: 2003/11/26 08:37:08 $
|
% $Revision: 1.80 $ $Date: 2003/12/02 03:29:38 $
|
||||||
%
|
%
|
||||||
%.ds h0 "
|
%.ds h0 "
|
||||||
%.ds h1 %.ds h2 \%
|
%.ds h1 %.ds h2 \%
|
||||||
@@ -2903,6 +2903,7 @@ Here's a couple of examples of autopickup\_exceptions:
|
|||||||
The first example above will result in autopickup of any type of arrow.
|
The first example above will result in autopickup of any type of arrow.
|
||||||
The second example results in the exclusion of any corpse from autopickup.
|
The second example results in the exclusion of any corpse from autopickup.
|
||||||
The last example results in the exclusion of items known to be cursed from autopickup.
|
The last example results in the exclusion of items known to be cursed from autopickup.
|
||||||
|
A `never pickup' rule takes precedence over an `always pickup' rule if both match.
|
||||||
|
|
||||||
%.lp
|
%.lp
|
||||||
%.hn 2
|
%.hn 2
|
||||||
|
|||||||
+27
-24
@@ -2848,7 +2848,7 @@ boolean setinitial,setfromfile;
|
|||||||
#ifdef AUTOPICKUP_EXCEPTIONS
|
#ifdef AUTOPICKUP_EXCEPTIONS
|
||||||
} else if (!strcmp("autopickup_exception", optname)) {
|
} else if (!strcmp("autopickup_exception", optname)) {
|
||||||
boolean retval;
|
boolean retval;
|
||||||
int pick_cnt, pick_idx, opt_idx = 0, pass;
|
int pick_cnt, pick_idx, opt_idx, pass;
|
||||||
int totalapes = 0, numapes[2] = {0,0};
|
int totalapes = 0, numapes[2] = {0,0};
|
||||||
menu_item *pick_list = (menu_item *)0;
|
menu_item *pick_list = (menu_item *)0;
|
||||||
anything any;
|
anything any;
|
||||||
@@ -2857,31 +2857,31 @@ boolean setinitial,setfromfile;
|
|||||||
static const char *action_titles[] = {
|
static const char *action_titles[] = {
|
||||||
"a", "add new autopickup exception",
|
"a", "add new autopickup exception",
|
||||||
"l", "list autopickup exceptions",
|
"l", "list autopickup exceptions",
|
||||||
"r", "remove existing autopickup exception"
|
"r", "remove existing autopickup exception",
|
||||||
|
"e", "exit this menu",
|
||||||
};
|
};
|
||||||
totalapes = count_ape_maps(&numapes[AP_LEAVE], &numapes[AP_GRAB]);
|
|
||||||
ape_again:
|
ape_again:
|
||||||
if (totalapes > 0) {
|
opt_idx = 0;
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
totalapes = count_ape_maps(&numapes[AP_LEAVE], &numapes[AP_GRAB]);
|
||||||
start_menu(tmpwin);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
any.a_int = 0;
|
start_menu(tmpwin);
|
||||||
for (i = 0; i < (totalapes ? SIZE(action_titles) :
|
any.a_int = 0;
|
||||||
SIZE(action_titles) - 4); i += 2) {
|
for (i = 0; i < SIZE(action_titles) ; i += 2) {
|
||||||
any.a_int++;
|
any.a_int++;
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, *action_titles[i],
|
if (!totalapes && (i >= 2 && i < 6)) continue;
|
||||||
0, ATR_NONE, action_titles[i+1], MENU_UNSELECTED);
|
add_menu(tmpwin, NO_GLYPH, &any, *action_titles[i],
|
||||||
}
|
0, ATR_NONE, action_titles[i+1], MENU_UNSELECTED);
|
||||||
end_menu(tmpwin, "Do what with autopickup exception list?");
|
}
|
||||||
if ((pick_cnt = select_menu(tmpwin, PICK_ONE, &pick_list)) > 0) {
|
end_menu(tmpwin, "Do what?");
|
||||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx) {
|
if ((pick_cnt = select_menu(tmpwin, PICK_ONE, &pick_list)) > 0) {
|
||||||
opt_idx = pick_list[pick_idx].item.a_int - 1;
|
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx) {
|
||||||
}
|
opt_idx = pick_list[pick_idx].item.a_int - 1;
|
||||||
free((genericptr_t)pick_list);
|
|
||||||
pick_list = (menu_item *)0;
|
|
||||||
}
|
}
|
||||||
destroy_nhwindow(tmpwin);
|
free((genericptr_t)pick_list);
|
||||||
if (pick_cnt < 1) return FALSE;
|
pick_list = (menu_item *)0;
|
||||||
} /* else just ask for new pickup exception string */
|
}
|
||||||
|
destroy_nhwindow(tmpwin);
|
||||||
|
if (pick_cnt < 1) return FALSE;
|
||||||
|
|
||||||
if (opt_idx == 0) { /* add new */
|
if (opt_idx == 0) { /* add new */
|
||||||
getlin("What new autopickup exception pattern?", &apebuf[1]);
|
getlin("What new autopickup exception pattern?", &apebuf[1]);
|
||||||
@@ -2889,6 +2889,9 @@ ape_again:
|
|||||||
apebuf[0] = '"';
|
apebuf[0] = '"';
|
||||||
Strcat(apebuf,"\"");
|
Strcat(apebuf,"\"");
|
||||||
add_autopickup_exception(apebuf);
|
add_autopickup_exception(apebuf);
|
||||||
|
goto ape_again;
|
||||||
|
} else if (opt_idx == 3) {
|
||||||
|
retval = TRUE;
|
||||||
} else { /* remove */
|
} else { /* remove */
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
@@ -2921,7 +2924,7 @@ ape_again:
|
|||||||
free((genericptr_t)pick_list);
|
free((genericptr_t)pick_list);
|
||||||
pick_list = (menu_item *)0;
|
pick_list = (menu_item *)0;
|
||||||
destroy_nhwindow(tmpwin);
|
destroy_nhwindow(tmpwin);
|
||||||
if (opt_idx == 1) goto ape_again;
|
goto ape_again;
|
||||||
}
|
}
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||||
|
|||||||
Reference in New Issue
Block a user