Allow BUC menu options when dealing with containers

not just when dropping. Alters the way the BUC patch
works, so that it uses getobj() callbacks.
This commit is contained in:
nethack.allison
2002-02-11 05:43:38 +00:00
parent 60fd75bbfd
commit 9748b45905
3 changed files with 22 additions and 42 deletions

View File

@@ -643,14 +643,6 @@ int retry;
all_categories = TRUE;
else if (pick_list[i].item.a_int == 'A')
drop_everything = TRUE;
else if (pick_list[i].item.a_int == 'B')
drop_blessed = TRUE;
else if (pick_list[i].item.a_int == 'C')
drop_cursed = TRUE;
else if (pick_list[i].item.a_int == 'U')
drop_uncursed = TRUE;
else if (pick_list[i].item.a_int == 'X')
drop_buc_unknown = TRUE;
else
add_valid_menu_class(pick_list[i].item.a_int);
}
@@ -672,35 +664,6 @@ int retry;
otmp2 = otmp->nobj;
n_dropped += drop(otmp);
}
} else if (drop_blessed) {
for(otmp = invent; otmp; otmp = otmp2) {
/* zw, gold is never blessed or cursed */
otmp2 = otmp->nobj;
if (otmp->oclass != GOLD_CLASS && otmp->bknown && otmp->blessed)
n_dropped += drop(otmp);
}
} else if (drop_cursed) {
for(otmp = invent; otmp; otmp = otmp2) {
/* zw, gold is never blessed or cursed */
otmp2 = otmp->nobj;
if (otmp->oclass != GOLD_CLASS && otmp->bknown && otmp->cursed)
n_dropped += drop(otmp);
}
} else if (drop_uncursed) {
for(otmp = invent; otmp; otmp = otmp2) {
/* zw, gold is never blessed or cursed */
otmp2 = otmp->nobj;
if (otmp->oclass != GOLD_CLASS &&
otmp->bknown && !otmp->blessed && !otmp->cursed)
n_dropped += drop(otmp);
}
} else if (drop_buc_unknown) {
for(otmp = invent; otmp; otmp = otmp2) {
/* zw, gold is never blessed or cursed */
otmp2 = otmp->nobj;
if (otmp->oclass != GOLD_CLASS && !otmp->bknown)
n_dropped += drop(otmp);
}
} else {
/* should coordinate with perm invent, maybe not show worn items */
n = query_objlist("What would you like to drop?", invent,