mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
feat: Enhance key selection process by storing original inventory keys and correct key ID for retries
This commit is contained in:
@@ -244,8 +244,8 @@ export class KeyOperations {
|
||||
// This is the locksmith-forge.html challenge mode
|
||||
this.parent.keySelection.createKeysForChallenge('correct_key');
|
||||
} else {
|
||||
// This is the main game - go back to key selection
|
||||
this.parent.startWithKeySelection();
|
||||
// This is the main game - go back to key selection with original inventory keys
|
||||
this.parent.startWithKeySelection(this.parent.originalInventoryKeys, this.parent.originalCorrectKeyId);
|
||||
}
|
||||
}
|
||||
}, 2000); // Longer delay to show the red flash
|
||||
|
||||
@@ -469,7 +469,10 @@ export class LockpickingMinigamePhaser extends MinigameScene {
|
||||
|
||||
this.keySelectionMode = true; // Mark that we're in key selection mode
|
||||
|
||||
// Store the original inventory keys and correct key ID for use when retrying after wrong selection
|
||||
if (inventoryKeys && inventoryKeys.length > 0) {
|
||||
this.originalInventoryKeys = inventoryKeys;
|
||||
this.originalCorrectKeyId = correctKeyId;
|
||||
// Use provided inventory keys
|
||||
this.keySelection.createKeysFromInventory(inventoryKeys, correctKeyId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user