From d59aaf51f96e310b9e2fde2bce9069b45fdd1545 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Sat, 22 Nov 2025 00:46:56 +0000 Subject: [PATCH] Export notifyServerUnlock from unlock-system.js Fixed ReferenceError where notifyServerUnlock was not defined in doors.js. The function was internal to unlock-system.js but is now needed by doors.js for notifying the server when unlocked doors are opened. Changes: - Export notifyServerUnlock from unlock-system.js - Import notifyServerUnlock in doors.js --- public/break_escape/js/systems/doors.js | 2 +- public/break_escape/js/systems/unlock-system.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/break_escape/js/systems/doors.js b/public/break_escape/js/systems/doors.js index 31ecca4..7515c05 100644 --- a/public/break_escape/js/systems/doors.js +++ b/public/break_escape/js/systems/doors.js @@ -14,7 +14,7 @@ import { GRID_UNIT_WIDTH_PX, GRID_UNIT_HEIGHT_PX } from '../utils/constants.js'; -import { handleUnlock } from './unlock-system.js'; +import { handleUnlock, notifyServerUnlock } from './unlock-system.js'; let gameRef = null; let rooms = null; diff --git a/public/break_escape/js/systems/unlock-system.js b/public/break_escape/js/systems/unlock-system.js index 0771347..8acd1a0 100644 --- a/public/break_escape/js/systems/unlock-system.js +++ b/public/break_escape/js/systems/unlock-system.js @@ -14,7 +14,7 @@ import { startLockpickingMinigame, startKeySelectionMinigame, startPinMinigame, import { playUISound } from './ui-sounds.js?v=1'; // Helper function to notify server of unlock and get room/container data -async function notifyServerUnlock(lockable, type, method) { +export async function notifyServerUnlock(lockable, type, method) { let serverResponse; const apiClient = window.ApiClient || window.APIClient; const gameId = window.breakEscapeConfig?.gameId;