modify of debug condition + turning string to int + making them default active

This commit is contained in:
Levent007 2021-03-08 11:33:49 +01:00
parent 6f4b592df6
commit c83bcfb8ae
3 changed files with 8 additions and 8 deletions

View File

@ -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>

View File

@ -177,8 +177,8 @@
"liveEnabled": true,
"liveThreshold": 52,
"liveMessage": "Live!",
"waitOnMapChanges": false,
"waitTimeOnNewGame": "30"
"waitOnNewGames": true,
"waitTimeOnNewGame": 30
},
{
"plugin": "SocketIOAPI",

View File

@ -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 &&