From 1f1a07113c4685ce61adfe86e9bee4b8d9b7c48a Mon Sep 17 00:00:00 2001 From: NewHappyRabbit <31893343+NewHappyRabbit@users.noreply.github.com> Date: Wed, 12 Feb 2025 02:21:46 +0200 Subject: [PATCH] Fixed creative mode not working in private lobby --- src/core/configuration/Config.ts | 1 + src/server/GameServer.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/core/configuration/Config.ts b/src/core/configuration/Config.ts index 09cd5644a..93fe1826d 100644 --- a/src/core/configuration/Config.ts +++ b/src/core/configuration/Config.ts @@ -71,6 +71,7 @@ export interface Config { numBots(): number; spawnNPCs(): boolean; spawnBots(): boolean; + creativeMode(): boolean; numSpawnPhaseTurns(): number; startManpower(playerInfo: PlayerInfo): number; diff --git a/src/server/GameServer.ts b/src/server/GameServer.ts index a69acaaa6..ddf0b5b87 100644 --- a/src/server/GameServer.ts +++ b/src/server/GameServer.ts @@ -63,6 +63,9 @@ export class GameServer { if (gameConfig.disableNPCs != null) { this.gameConfig.disableNPCs = gameConfig.disableNPCs; } + if (gameConfig.creativeMode != null) { + this.gameConfig.creativeMode = gameConfig.creativeMode; + } } public addClient(client: Client, lastTurn: number) {