Update mapvote.js

This commit is contained in:
Davide Fantino 2022-09-06 15:32:48 +02:00 committed by GitHub
parent 5e9aeae5da
commit e9f6551a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,6 +139,7 @@ export default class MapVote extends BasePlugin {
// setTimeout(()=>{this.msgDirect('76561198419229279',"MV\ntest\ntest")},1000) // setTimeout(()=>{this.msgDirect('76561198419229279',"MV\ntest\ntest")},1000)
// this.msgBroadcast("[MapVote] Seeding mode active") // 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)) { 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 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 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; const nextMap = randomElement(seedingMaps).layerid;