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
This commit is contained in:
Z. Cliffe Schreuders
2025-11-22 00:46:56 +00:00
parent b2c8362d91
commit d59aaf51f9
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;