mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user