From 88dfd01628889c3df36fd9e8b53ce4eaa2091c26 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 25 Feb 2025 12:45:02 +0000 Subject: [PATCH] Added ability to use lockpick if no key is present --- index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index ce8e2e4..6ad11f9 100644 --- a/index.html +++ b/index.html @@ -1900,7 +1900,17 @@ unlockTarget(lockable, type, lockable.layer); // Pass the layer here alert(`You used the ${keyName} that you found in ${keyLocation} to unlock the ${type}.`); } else { - alert(`Requires key: ${requiredKey}`); + // Check for lockpick kit + const hasLockpick = inventory.items.some(item => + item && item.scenarioData && + item.scenarioData.type === 'lockpick' + ); + + if (hasLockpick) { + alert("This lock can be picked with your lockpick kit!"); + } else { + alert(`Requires key: ${requiredKey}`); + } } break;