From 0e0442acdc9c814da34c8cbe1e38f7dd9ec501a5 Mon Sep 17 00:00:00 2001 From: Damian-I Date: Sat, 8 Mar 2025 04:19:10 +0000 Subject: [PATCH] Fixed bug with items not collecting after lockpicking when interacting --- index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 9cacef4..c7a3662 100644 --- a/index.html +++ b/index.html @@ -2157,7 +2157,7 @@ if (distanceSq > INTERACTION_RANGE_SQ) { // Show notification instead of alert - gameAlert("Too far away to interact with this object.", 'warning', '', 2000); + //gameAlert("Too far away to interact with this object.", 'warning', '', 2000); return; } } @@ -4478,6 +4478,12 @@ else if (lockable && lockable.scenarioData) { console.log('Unlocking container:', lockable.scenarioData); lockable.scenarioData.locked = false; + + // Set the flag to indicate the container is unlocked but contents not collected + if (lockable.scenarioData.contents && lockable.scenarioData.contents.length > 0) { + lockable.scenarioData.isUnlockedButNotCollected = true; + debugLog('Container unlocked and ready for collection', lockable.scenarioData, 1); + } } // Remove the minigame