From ad555cb4e52aa3c2fb3cecf8e85e1f943ec44234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Dahlgren?= Date: Fri, 3 Apr 2015 12:23:17 +0200 Subject: [PATCH] Set game type in config file --- config.js.example | 1 + lib/server.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/config.js.example b/config.js.example index 166eb06..e0fdbbd 100644 --- a/config.js.example +++ b/config.js.example @@ -1,4 +1,5 @@ module.exports = { + game: 'arma3', // arma3, arma2oa, arma2, arma1, cwa, ofpresistance, ofp path: 'path-to-arma3-directory', port: 3000, type: 'linux', // Can be either linux, windows or wine diff --git a/lib/server.js b/lib/server.js index ff13944..35a7b9f 100644 --- a/lib/server.js +++ b/lib/server.js @@ -5,6 +5,8 @@ var spawn = require('child_process').spawn; var ArmaServer = require('arma-server'); +var config = require('../config.js'); + var queryInterval = 5000; var Server = function (path, type, options) { @@ -56,6 +58,7 @@ Server.prototype.start = function() { battleEye: this.battle_eye ? 1 : 0, config: this.id, disableVoN: this.von ? 0 : 1, + game: config.game, headlessClients: this.headless ? ["127.0.0.1"] : null, hostname: this.title, localClient: this.headless ? ["127.0.0.1"] : null, @@ -98,6 +101,7 @@ Server.prototype.start = function() { if (this.headless) { var headless = new ArmaServer.Headless({ + game: config.game, host: "127.0.0.1", mods: this.mods, password: this.password,