Looting will fall through to force
If you have autounlock on, and don't have unlocking tool, but are wielding a weapon usable for forcing the lock.
This commit is contained in:
12
src/pickup.c
12
src/pickup.c
@@ -1877,9 +1877,15 @@ do_loot_cont(struct obj **cobjp,
|
||||
pline("Hmmm, %s turns out to be locked.", the(xname(cobj)));
|
||||
cobj->lknown = 1;
|
||||
|
||||
if (flags.autounlock && (unlocktool = autokey(TRUE)) != 0) {
|
||||
/* pass ox and oy to avoid direction prompt */
|
||||
return (pick_lock(unlocktool, cobj->ox, cobj->oy, cobj) != 0);
|
||||
if (flags.autounlock) {
|
||||
if ((unlocktool = autokey(TRUE)) != 0) {
|
||||
/* pass ox and oy to avoid direction prompt */
|
||||
return (pick_lock(unlocktool, cobj->ox, cobj->oy, cobj) != 0);
|
||||
} else if (ccount == 1 && u_have_forceable_weapon()) {
|
||||
/* single container, and we could #force it open... */
|
||||
cmdq_add_ec(doforce); /* doforce asks for confirmation */
|
||||
g.abort_looting = TRUE;
|
||||
}
|
||||
}
|
||||
return ECMD_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user