mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
add file patching options
This commit is contained in:
parent
4763420f7b
commit
a3298f3057
@ -102,8 +102,10 @@ Manager.prototype.save = function () {
|
|||||||
this.serversArr.forEach(function (server) {
|
this.serversArr.forEach(function (server) {
|
||||||
data.push({
|
data.push({
|
||||||
admin_password: server.admin_password,
|
admin_password: server.admin_password,
|
||||||
|
allowed_file_patching: server.allowed_file_patching,
|
||||||
auto_start: server.auto_start,
|
auto_start: server.auto_start,
|
||||||
battle_eye: server.battle_eye,
|
battle_eye: server.battle_eye,
|
||||||
|
file_patching: server.file_patching,
|
||||||
forcedDifficulty: server.forcedDifficulty,
|
forcedDifficulty: server.forcedDifficulty,
|
||||||
max_players: server.max_players,
|
max_players: server.max_players,
|
||||||
missions: server.missions,
|
missions: server.missions,
|
||||||
|
@ -46,8 +46,10 @@ Server.prototype.generateId = function () {
|
|||||||
|
|
||||||
Server.prototype.update = function (options) {
|
Server.prototype.update = function (options) {
|
||||||
this.admin_password = options.admin_password
|
this.admin_password = options.admin_password
|
||||||
|
this.allowed_file_patching = options.allowed_file_patching
|
||||||
this.auto_start = options.auto_start
|
this.auto_start = options.auto_start
|
||||||
this.battle_eye = options.battle_eye
|
this.battle_eye = options.battle_eye
|
||||||
|
this.file_patching = options.file_patching
|
||||||
this.forcedDifficulty = options.forcedDifficulty || null
|
this.forcedDifficulty = options.forcedDifficulty || null
|
||||||
this.max_players = options.max_players
|
this.max_players = options.max_players
|
||||||
this.missions = options.missions
|
this.missions = options.missions
|
||||||
@ -112,10 +114,12 @@ Server.prototype.start = function () {
|
|||||||
var parameters = this.getParameters()
|
var parameters = this.getParameters()
|
||||||
var server = new ArmaServer.Server({
|
var server = new ArmaServer.Server({
|
||||||
admins: config.admins,
|
admins: config.admins,
|
||||||
|
allowedFilePatching: this.allowed_file_patching || 1,
|
||||||
battleEye: this.battle_eye ? 1 : 0,
|
battleEye: this.battle_eye ? 1 : 0,
|
||||||
config: this.id,
|
config: this.id,
|
||||||
disableVoN: this.von ? 0 : 1,
|
disableVoN: this.von ? 0 : 1,
|
||||||
game: config.game,
|
game: config.game,
|
||||||
|
filePatching: this.file_patching || false,
|
||||||
forcedDifficulty: this.forcedDifficulty || null,
|
forcedDifficulty: this.forcedDifficulty || null,
|
||||||
headlessClients: this.number_of_headless_clients > 0 ? ['127.0.0.1'] : null,
|
headlessClients: this.number_of_headless_clients > 0 ? ['127.0.0.1'] : null,
|
||||||
hostname: createServerTitle(this.title),
|
hostname: createServerTitle(this.title),
|
||||||
@ -194,6 +198,7 @@ Server.prototype.startHeadlessClients = function () {
|
|||||||
var self = this
|
var self = this
|
||||||
var headlessClientInstances = _.times(this.number_of_headless_clients, function (i) {
|
var headlessClientInstances = _.times(this.number_of_headless_clients, function (i) {
|
||||||
var headless = new ArmaServer.Headless({
|
var headless = new ArmaServer.Headless({
|
||||||
|
filePatching: self.file_patching,
|
||||||
game: config.game,
|
game: config.game,
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
mods: self.mods,
|
mods: self.mods,
|
||||||
@ -272,9 +277,11 @@ Server.prototype.stopHeadlessClients = function () {
|
|||||||
Server.prototype.toJSON = function () {
|
Server.prototype.toJSON = function () {
|
||||||
return {
|
return {
|
||||||
admin_password: this.admin_password,
|
admin_password: this.admin_password,
|
||||||
|
allowed_file_patching: this.allowed_file_patching,
|
||||||
auto_start: this.auto_start,
|
auto_start: this.auto_start,
|
||||||
battle_eye: this.battle_eye,
|
battle_eye: this.battle_eye,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
|
filePatching: this.file_patching,
|
||||||
forcedDifficulty: this.forcedDifficulty,
|
forcedDifficulty: this.forcedDifficulty,
|
||||||
max_players: this.max_players,
|
max_players: this.max_players,
|
||||||
missions: this.missions,
|
missions: this.missions,
|
||||||
|
@ -9,8 +9,10 @@ define(function (require) {
|
|||||||
return Backbone.Model.extend({
|
return Backbone.Model.extend({
|
||||||
defaults: {
|
defaults: {
|
||||||
admin_password: '',
|
admin_password: '',
|
||||||
|
allowed_file_patching: 1,
|
||||||
auto_start: false,
|
auto_start: false,
|
||||||
battle_eye: false,
|
battle_eye: false,
|
||||||
|
file_patching: false,
|
||||||
forcedDifficulty: '',
|
forcedDifficulty: '',
|
||||||
max_players: null,
|
max_players: null,
|
||||||
mods: [],
|
mods: [],
|
||||||
|
@ -20,8 +20,10 @@ define(function (require) {
|
|||||||
serialize : function() {
|
serialize : function() {
|
||||||
return {
|
return {
|
||||||
admin_password: this.$("form .admin-password").val(),
|
admin_password: this.$("form .admin-password").val(),
|
||||||
|
allowed_file_patching: this.$("form .allowed-file-patching").prop("checked") ? 2 : 1,
|
||||||
auto_start: this.$("form .auto-start").prop("checked"),
|
auto_start: this.$("form .auto-start").prop("checked"),
|
||||||
battle_eye: this.$("form .battle-eye").prop("checked"),
|
battle_eye: this.$("form .battle-eye").prop("checked"),
|
||||||
|
file_patching: this.$("form .file-patching").prop("checked"),
|
||||||
forcedDifficulty: this.$("form .forcedDifficulty").val(),
|
forcedDifficulty: this.$("form .forcedDifficulty").val(),
|
||||||
max_players: this.$("form .max-players").val(),
|
max_players: this.$("form .max-players").val(),
|
||||||
motd: this.$("form .motd").val(),
|
motd: this.$("form .motd").val(),
|
||||||
|
@ -59,6 +59,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">File Patching</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" class="allowed-file-patching" <% if (allowed_file_patching === 2) { %>checked="checked"<% } %>> Allow file patching for clients
|
||||||
|
<p class="help-block">Required for client userconfigs</p>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" class="file-patching" <% if (file_patching) { %>checked="checked"<% } %>> Use file patching on server
|
||||||
|
<p class="help-block">Required for server userconfigs</p>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="headless-clients" class="col-sm-2 control-label">Headless Clients</label>
|
<label for="headless-clients" class="col-sm-2 control-label">Headless Clients</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
Loading…
Reference in New Issue
Block a user