Update mapvote.js

This commit is contained in:
Skillet 2023-07-26 23:09:22 -04:00 committed by GitHub
parent c65dd3a442
commit 0d9b63bbe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -645,7 +645,8 @@ export default class MapVote extends DiscordBasePlugin {
const versionfilt = gamemodefilt.filter(l => (!cls[3] || (cls[3] === "*" || l.version.toLowerCase().startsWith("v" + cls[3].replace(/v/gi, ''))))); const versionfilt = gamemodefilt.filter(l => (!cls[3] || (cls[3] === "*" || l.version.toLowerCase().startsWith("v" + cls[3].replace(/v/gi, '')))));
const factionfilt = versionfilt.filter(l => (!cls[4] || (cls[4] === "*" || [this.getTranslation(l.teams[0]), this.getTranslation(l.teams[1])].includes(cls[4].toUpperCase())))); const factionfilt = versionfilt.filter(l => (!cls[4] || (cls[4] === "*" || [this.getTranslation(l.teams[0]), this.getTranslation(l.teams[1])].includes(cls[4].toUpperCase()))));
const factionblack = this.layerfilterFactionBlacklist(factionfilt); const samelayerfilt = factionfilt.filter((l) => !(rnd_layers.find((rl) => rl.layerid === l.layerid)));
const factionblack = this.layerfilterFactionBlacklist(samelayerfilt);
const gamemodewhite = this.layerfilterGamemodeWlist(factionblack); const gamemodewhite = this.layerfilterGamemodeWlist(factionblack);
const samemapfilt = gamemodewhite.filter((l) => rnd_layers.filter(l2 => l2.map.name === l.map.name).length < this.options.allowedSameMapEntries); const samemapfilt = gamemodewhite.filter((l) => rnd_layers.filter(l2 => l2.map.name === l.map.name).length < this.options.allowedSameMapEntries);
const prevmapfilt = this.layerfilterPrevMaps(samemapfilt); const prevmapfilt = this.layerfilterPrevMaps(samemapfilt);