From dc6782c7eabddabec1accdf4cc34f5bcb100ace7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 31 Jan 2026 04:31:41 +0000 Subject: [PATCH] fix: Add isInMultiplayerMode method to GameCore for worker compatibility AIMicroSystem calls game.isInMultiplayerMode() but WorkerGame extends GameCore (not Game), which was missing this method. This caused "e.isInMultiplayerMode is not a function" error during worker initialization. https://claude.ai/code/session_0123HA6ovqXT4Gk6EyLXoc3h --- src/engine/core/GameCore.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/engine/core/GameCore.ts b/src/engine/core/GameCore.ts index 4a34ecd8..dbd686c6 100644 --- a/src/engine/core/GameCore.ts +++ b/src/engine/core/GameCore.ts @@ -498,6 +498,14 @@ export abstract class GameCore { return this.currentTick / this.config.tickRate; } + /** + * Check if the game is running in multiplayer mode. + * Used by systems like AIMicroSystem to disable certain behaviors. + */ + public isInMultiplayerMode(): boolean { + return this.config.isMultiplayer; + } + // ============================================================================ // COMMAND PROCESSING (shared implementation) // ============================================================================