should be able to 'o'perate a lockpick to trigger the 'pick locks' skill using that object.

This commit is contained in:
Rob Pearce 2016-06-13 09:30:03 +10:00
parent 51bdeede32
commit 4c4c3a3e04
3 changed files with 6 additions and 1 deletions

2
data.c
View File

@ -6336,6 +6336,8 @@ void initobjects(void) {
addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL); addflag(lastot->flags, F_RARITY, H_ALL, 75, NA, NULL);
addflag(lastot->flags, F_VALUE, 10, NA, NA, NULL); addflag(lastot->flags, F_VALUE, 10, NA, NA, NULL);
addflag(lastot->flags, F_OPERNEEDDIR, B_TRUE, NA, NA, "Pick a lock in which direction");
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
addflag(lastot->flags, F_PICKLOCKS, 10, B_DIEONFAIL, NA, NULL); addflag(lastot->flags, F_PICKLOCKS, 10, B_DIEONFAIL, NA, NULL);
addot(OT_PANPIPES, "set of panpipes", "A set of musical pipes.", MT_METAL, 0.5, OC_TOOLS, SZ_TINY); addot(OT_PANPIPES, "set of panpipes", "A set of musical pipes.", MT_METAL, 0.5, OC_TOOLS, SZ_TINY);

View File

@ -11878,6 +11878,9 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
if (!seen) { if (!seen) {
noise(where, NULL, NC_OTHER, SV_WHISPER, "something spraying.", NULL); noise(where, NULL, NC_OTHER, SV_WHISPER, "something spraying.", NULL);
} }
} else if (o->type->id == OT_LOCKPICK) {
lockpick(lf, where, NULL, o);
} else if (isfillable(o)) { } else if (isfillable(o)) {
object_t *oo,*nextoo; object_t *oo,*nextoo;
object_t *notenough = NULL; object_t *notenough = NULL;

View File

@ -10638,7 +10638,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
} }
if (prompt.nchoices == 0) { if (prompt.nchoices == 0) {
msg("Your spell does detect anything nearby."); msg("Your spell does not detect anything nearby.");
} else { } else {
getchoice(&prompt); getchoice(&prompt);
o = (object_t *)prompt.result; o = (object_t *)prompt.result;