Make looting less tedious
I've seen complaints how looting containers is tedious, and since multiple containers in the same location are now (and have been for a while) handled with a menu, the yes-no-quit prompt for a single container doesn't really mean anything. Remove that prompt, and remove the "open carefully" message too, so when you're looting a location with a single container, the command will drop straight into the loot-in-out -menu. Also adjust one looting message to explicitly mention the container if there are other objects on top of it. Removing the prompt means you can't loot a saddle from a tame monster with plain loot when standing on a container - you need to prefix the loot command with 'm' prefix in that case.
This commit is contained in:
@@ -795,6 +795,8 @@ make ravens oviparous
|
|||||||
thrown items can get stuck in webs
|
thrown items can get stuck in webs
|
||||||
engraving with Fire Brand burns the text on the floor and does not
|
engraving with Fire Brand burns the text on the floor and does not
|
||||||
dull the artifact
|
dull the artifact
|
||||||
|
make looting less tedious by getting rid of a y/n prompt making the command
|
||||||
|
go directly into the loot-in-out -menu
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
14
src/pickup.c
14
src/pickup.c
@@ -1868,7 +1868,7 @@ do_loot_cont(struct obj **cobjp,
|
|||||||
if (cobj->olocked) {
|
if (cobj->olocked) {
|
||||||
struct obj *unlocktool;
|
struct obj *unlocktool;
|
||||||
|
|
||||||
if (ccount < 2)
|
if (ccount < 2 && (g.level.objects[cobj->ox][cobj->oy] == cobj))
|
||||||
pline("%s locked.",
|
pline("%s locked.",
|
||||||
cobj->lknown ? "It is" : "Hmmm, it turns out to be");
|
cobj->lknown ? "It is" : "Hmmm, it turns out to be");
|
||||||
else if (cobj->lknown)
|
else if (cobj->lknown)
|
||||||
@@ -1902,9 +1902,6 @@ do_loot_cont(struct obj **cobjp,
|
|||||||
g.abort_looting = TRUE;
|
g.abort_looting = TRUE;
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
You("%sopen %s...", (!cobj->cknown || !cobj->lknown) ? "carefully " : "",
|
|
||||||
the(xname(cobj)));
|
|
||||||
return use_container(cobjp, 0, (boolean) (cindex < ccount));
|
return use_container(cobjp, 0, (boolean) (cindex < ccount));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1931,7 +1928,6 @@ doloot_core(void)
|
|||||||
boolean underfoot = TRUE;
|
boolean underfoot = TRUE;
|
||||||
const char *dont_find_anything = "don't find anything";
|
const char *dont_find_anything = "don't find anything";
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
char qbuf[BUFSZ];
|
|
||||||
int prev_inquiry = 0;
|
int prev_inquiry = 0;
|
||||||
boolean prev_loot = FALSE;
|
boolean prev_loot = FALSE;
|
||||||
int num_conts = 0;
|
int num_conts = 0;
|
||||||
@@ -2022,15 +2018,7 @@ doloot_core(void)
|
|||||||
nobj = cobj->nexthere;
|
nobj = cobj->nexthere;
|
||||||
|
|
||||||
if (Is_container(cobj)) {
|
if (Is_container(cobj)) {
|
||||||
c = ynq(safe_qbuf(qbuf, "There is ", " here, loot it?",
|
|
||||||
cobj, doname, ansimpleoname,
|
|
||||||
"a container"));
|
|
||||||
if (c == 'q')
|
|
||||||
return (timepassed ? ECMD_TIME : ECMD_OK);
|
|
||||||
if (c == 'n')
|
|
||||||
continue;
|
|
||||||
anyfound = TRUE;
|
anyfound = TRUE;
|
||||||
|
|
||||||
timepassed |= do_loot_cont(&cobj, 1, 1);
|
timepassed |= do_loot_cont(&cobj, 1, 1);
|
||||||
if (g.abort_looting)
|
if (g.abort_looting)
|
||||||
/* chest trap or magic bag explosion or <esc> */
|
/* chest trap or magic bag explosion or <esc> */
|
||||||
|
|||||||
Reference in New Issue
Block a user