From 4c4c3a3e04de597d8f65b66e9fde938fcfc1c728 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Mon, 13 Jun 2016 09:30:03 +1000 Subject: [PATCH] should be able to 'o'perate a lockpick to trigger the 'pick locks' skill using that object. --- data.c | 2 ++ objects.c | 3 +++ spell.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/data.c b/data.c index 439056c..d0f476c 100644 --- a/data.c +++ b/data.c @@ -6336,6 +6336,8 @@ void initobjects(void) { addflag(lastot->flags, F_STACKABLE, B_TRUE, NA, 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_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); addot(OT_PANPIPES, "set of panpipes", "A set of musical pipes.", MT_METAL, 0.5, OC_TOOLS, SZ_TINY); diff --git a/objects.c b/objects.c index 5df9ea4..3a8e6c1 100644 --- a/objects.c +++ b/objects.c @@ -11878,6 +11878,9 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) { if (!seen) { 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)) { object_t *oo,*nextoo; object_t *notenough = NULL; diff --git a/spell.c b/spell.c index 6c20428..ebfe9e4 100644 --- a/spell.c +++ b/spell.c @@ -10638,7 +10638,7 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_ } if (prompt.nchoices == 0) { - msg("Your spell does detect anything nearby."); + msg("Your spell does not detect anything nearby."); } else { getchoice(&prompt); o = (object_t *)prompt.result;