From 984da6d290ec223703df750fa2f37bf2085aa775 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Tue, 25 Feb 2025 12:50:54 +0000 Subject: [PATCH] Added option for user to not use lockpick, also the door now unlocks if they choose to use it. --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 6ad11f9..ef0898a 100644 --- a/index.html +++ b/index.html @@ -1897,7 +1897,7 @@ const keyName = keyItem?.scenarioData?.name || 'key'; const keyLocation = keyItem?.scenarioData?.foundIn || 'your inventory'; - unlockTarget(lockable, type, lockable.layer); // Pass the layer here + unlockTarget(lockable, type, lockable.layer); alert(`You used the ${keyName} that you found in ${keyLocation} to unlock the ${type}.`); } else { // Check for lockpick kit @@ -1907,7 +1907,10 @@ ); if (hasLockpick) { - alert("This lock can be picked with your lockpick kit!"); + if (confirm("Would you like to attempt picking this lock?")) { + unlockTarget(lockable, type, lockable.layer); + alert("You successfully picked the lock!"); + } } else { alert(`Requires key: ${requiredKey}`); }