diff --git a/src/client/ClientGameRunner.ts b/src/client/ClientGameRunner.ts index 9524e7c1b..fa54d60c1 100644 --- a/src/client/ClientGameRunner.ts +++ b/src/client/ClientGameRunner.ts @@ -162,7 +162,7 @@ async function createClientGame( const worker = new WorkerClient( lobbyConfig.gameStartInfo, lobbyConfig.clientID, - userSettings, + userSettings.getData(), ); await worker.initialize(); const gameView = new GameView( diff --git a/src/core/worker/WorkerClient.ts b/src/core/worker/WorkerClient.ts index f81624b32..715c268d4 100644 --- a/src/core/worker/WorkerClient.ts +++ b/src/core/worker/WorkerClient.ts @@ -7,6 +7,7 @@ import { } from "../game/Game"; import { TileRef } from "../game/GameMap"; import { ErrorUpdate, GameUpdateViewData } from "../game/GameUpdates"; +import { UserSettingsData } from "../game/UserSettings"; import { ClientID, GameStartInfo, Turn } from "../Schemas"; import { generateID } from "../Util"; import { WorkerMessage } from "./WorkerMessages"; @@ -22,7 +23,7 @@ export class WorkerClient { constructor( private gameStartInfo: GameStartInfo, private clientID: ClientID, - private userSettings: UserSettings, + private userSettingsData: UserSettingsData, ) { this.worker = new Worker(new URL("./Worker.worker.ts", import.meta.url)); this.messageHandlers = new Map(); @@ -71,7 +72,7 @@ export class WorkerClient { id: messageId, gameStartInfo: this.gameStartInfo, clientID: this.clientID, - userSettings: this.userSettings.getData(), + userSettings: this.userSettingsData, }); // Add timeout for initialization