mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 11:54:23 -05:00
modify of debug condition + turning string to int + making them default active
This commit is contained in:
parent
6f4b592df6
commit
c83bcfb8ae
@ -778,7 +778,7 @@ Grafana (NOT YET WORKING WITH V2):
|
||||
<h6>Description</h6>
|
||||
<p>Should the plugin wait to be executed on NEW_GAME event.</p>
|
||||
<h6>Default</h6>
|
||||
<pre><code>false</code></pre></li>
|
||||
<pre><code>true</code></pre></li>
|
||||
<li><h4>waitTimeOnNewGame</h4>
|
||||
<h6>Description</h6>
|
||||
<p>The time to wait before check player counts in seconds.</p>
|
||||
|
@ -177,8 +177,8 @@
|
||||
"liveEnabled": true,
|
||||
"liveThreshold": 52,
|
||||
"liveMessage": "Live!",
|
||||
"waitOnMapChanges": false,
|
||||
"waitTimeOnNewGame": "30"
|
||||
"waitOnNewGames": true,
|
||||
"waitTimeOnNewGame": 30
|
||||
},
|
||||
{
|
||||
"plugin": "SocketIOAPI",
|
||||
|
@ -45,15 +45,15 @@ export default class SeedingMode extends BasePlugin {
|
||||
description: '"Live" message to display.',
|
||||
default: 'Live!'
|
||||
},
|
||||
waitOnMapChanges: {
|
||||
waitOnNewGames: {
|
||||
required: false,
|
||||
description: 'Should the plugin wait to be executed on NEW_GAME event.',
|
||||
default: false
|
||||
default: true
|
||||
},
|
||||
waitTimeOnNewGame: {
|
||||
required: false,
|
||||
description: 'The time to wait before check player counts in seconds.',
|
||||
default: '30'
|
||||
default: 30
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -67,7 +67,7 @@ export default class SeedingMode extends BasePlugin {
|
||||
}
|
||||
|
||||
async mount() {
|
||||
if (this.options.waitOnMapChanges) {
|
||||
if (this.options.waitOnNewGames) {
|
||||
this.server.on('NEW_GAME', this.onNewGame);
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ export default class SeedingMode extends BasePlugin {
|
||||
}
|
||||
|
||||
async broadcast() {
|
||||
if (this.options.waitOnMapChanges && !this.waitOnMapChange) {
|
||||
if (this.options.waitOnNewGames && this.waitOnMapChange) {
|
||||
setTimeout(async () => {
|
||||
if (
|
||||
this.server.a2sPlayerCount !== 0 &&
|
||||
|
Loading…
Reference in New Issue
Block a user