From e9f6551a1f98a95fb3b864a3cb6743481f4a2224 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Tue, 6 Sep 2022 15:32:48 +0200 Subject: [PATCH] Update mapvote.js --- mapvote.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index b7ca437..7d3448b 100644 --- a/mapvote.js +++ b/mapvote.js @@ -139,7 +139,8 @@ export default class MapVote extends BasePlugin { // setTimeout(()=>{this.msgDirect('76561198419229279',"MV\ntest\ntest")},1000) // this.msgBroadcast("[MapVote] Seeding mode active") if (this && this.options && this.server && this.options.automaticSeedingMode && ((this.server.nextLayer && this.server.nextLayer.gamemode.toLowerCase() != "seed") || this.server.currentLayer.layerid == this.server.nextLayer.layerid)) { - const seedingMaps = Layers.layers.filter((l) => l.gamemode.toUpperCase() == "SEED" && !mapBlacklist.includes(l.map.name) && l.layerid != this.server.currentLayer.layerid && !this.options.layerLevelBlacklist.find((fl)=>l.layerid.toLowerCase().startsWith(fl.toLowerCase()))) + const mapBlacklist=[]; +const seedingMaps = Layers.layers.filter((l) => l.gamemode.toUpperCase() == "SEED" && !mapBlacklist.includes(l.map.name) && l.layerid != this.server.currentLayer.layerid && !this.options.layerLevelBlacklist.find((fl)=>l.layerid.toLowerCase().startsWith(fl.toLowerCase()))) const nextMap = randomElement(seedingMaps).layerid; if (this.server.players && this.server.players.length < 20) { @@ -465,4 +466,4 @@ export default class MapVote extends BasePlugin { return ties.map(i => this.nominations[ i ]); } -} \ No newline at end of file +}