quick fix

This commit is contained in:
Fantino Davide 2022-09-07 22:52:35 +02:00
parent e1540c853c
commit 2298f7cbc0

View File

@ -144,8 +144,8 @@ export default class MapVote extends BasePlugin {
const currentNextLayerExist = this.server.currentLayer && this.server.nextLayer; const currentNextLayerExist = this.server.currentLayer && this.server.nextLayer;
if (baseDataExist && this.options.automaticSeedingMode && ((this.server.nextLayer && this.server.nextLayer.gamemode.toLowerCase() != "seed") || (currentNextLayerExist && this.server.currentLayer.layerid == this.server.nextLayer.layerid))) { if (baseDataExist && this.options.automaticSeedingMode && ((this.server.nextLayer && this.server.nextLayer.gamemode.toLowerCase() != "seed") || (currentNextLayerExist && this.server.currentLayer.layerid == this.server.nextLayer.layerid))) {
const seedingMaps = Layers.layers.filter((l) => l.gamemode.toUpperCase() == "SEED" && (currentNextLayerExist && 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" && (currentNextLayerExist && l.layerid != this.server.currentLayer.layerid && !this.options.layerLevelBlacklist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase()))))
const rndMap = randomElement(seedingMaps);
do { do {
const rndMap = randomElement(seedingMaps);
if (rndMap.layerid) { if (rndMap.layerid) {
const nextMap = rndMap.layerid; const nextMap = rndMap.layerid;
if (this.server.players && this.server.players.length < 20) { if (this.server.players && this.server.players.length < 20) {