mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-27 23:36:13 +00:00
server refactor
This commit is contained in:
+1
-9
@@ -18,7 +18,6 @@ import {
|
||||
import { UserSettings } from "../../src/core/game/UserSettings";
|
||||
import { GameConfig } from "../../src/core/Schemas";
|
||||
import { TestConfig } from "./TestConfig";
|
||||
import { TestServerConfig } from "./TestServerConfig";
|
||||
|
||||
export async function setup(
|
||||
mapName: string,
|
||||
@@ -53,8 +52,6 @@ export async function setup(
|
||||
const gameMap = await genTerrainFromBin(manifest.map, mapBinBuffer);
|
||||
const miniGameMap = await genTerrainFromBin(manifest.map4x, miniMapBinBuffer);
|
||||
|
||||
// Configure the game
|
||||
const serverConfig = new TestServerConfig();
|
||||
const gameConfig: GameConfig = {
|
||||
gameMap: GameMapType.Asia,
|
||||
gameMapSize: GameMapSize.Normal,
|
||||
@@ -71,12 +68,7 @@ export async function setup(
|
||||
randomSpawn: false,
|
||||
..._gameConfig,
|
||||
};
|
||||
const config = new ConfigClass(
|
||||
serverConfig,
|
||||
gameConfig,
|
||||
new UserSettings(),
|
||||
false,
|
||||
);
|
||||
const config = new ConfigClass(gameConfig, new UserSettings(), false);
|
||||
|
||||
return createGame(humans, [], gameMap, miniGameMap, config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user