mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 18:23:52 -06:00
seeding mode delay
This commit is contained in:
parent
8c66119aa5
commit
b2bfd3a167
@ -142,7 +142,7 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
this.server.on('NEW_GAME', this.onNewGame);
|
||||
this.server.on('CHAT_MESSAGE', this.onChatMessage);
|
||||
this.server.on('PLAYER_DISCONNECTED', this.onPlayerDisconnected);
|
||||
this.server.on('PLAYER_CONNECTED', this.setSeedingMode);
|
||||
this.server.on('PLAYER_CONNECTED', () => { setTimeout(this.setSeedingMode, 5000) });
|
||||
this.verbose(1, 'Map vote was mounted.');
|
||||
this.verbose(1, "Blacklisted Layers/Levels: " + this.options.layerLevelBlacklist.join(', '))
|
||||
// await this.checkUpdates();
|
||||
@ -192,11 +192,12 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
}
|
||||
}
|
||||
this.verbose(1, logTimeframe + activeTfIds.join(', '));
|
||||
const _verbose = this.verbose;
|
||||
|
||||
function tfFilter(tf, key, arr) {
|
||||
const utcDelay = tf.timezone ? parseFloat(tf.timezone) : 0;
|
||||
const timeNow = new Date(0, 0, 0, new Date().getUTCHours() + utcDelay, new Date().getUTCMinutes());
|
||||
this.verbose(1, `Current time (UTC+${utcDelay}) ${timeNow.getHours()}:${timeNow.getMinutes()}`)
|
||||
_verbose(1, `Current time (UTC+${utcDelay}) ${timeNow.getHours()}:${timeNow.getMinutes()}`)
|
||||
|
||||
const tfStartSplit = [ parseInt(tf.start.split(':')[ 0 ]), parseInt(tf.start.split(':')[ 1 ]) ];
|
||||
const tfEndSplit = [ parseInt(tf.end.split(':')[ 0 ]), parseInt(tf.end.split(':')[ 1 ]) ];
|
||||
|
Loading…
x
Reference in New Issue
Block a user