mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 20:43:52 -06:00
improvements
This commit is contained in:
parent
32af8290d9
commit
832179505d
@ -329,7 +329,7 @@ export default class MapVote extends BasePlugin {
|
|||||||
if (cmdLayers.length <= 6)
|
if (cmdLayers.length <= 6)
|
||||||
for (let cl of cmdLayers) {
|
for (let cl of cmdLayers) {
|
||||||
const cls = cl.split('_');
|
const cls = cl.split('_');
|
||||||
const fLayers = Layers.layers.filter((l) => ((cls[ 0 ] == "*" || l.classname.toLowerCase().startsWith(cls[ 0 ])) && (l.gamemode.toLowerCase().startsWith(cls[ 1 ]) || (!cls[ 1 ] && [ 'RAAS', 'AAS', 'INVASION' ].includes(l.gamemode.toUpperCase()))) && (!cls[ 2 ] || l.version.toLowerCase().startsWith("v" + cls[ 2 ].replace(/v/gi, '')))));
|
const fLayers = sanitizedLayers.filter((l) => ((cls[ 0 ] == "*" || l.classname.toLowerCase().startsWith(cls[ 0 ])) && (l.gamemode.toLowerCase().startsWith(cls[ 1 ]) || (!cls[ 1 ] && [ 'RAAS', 'AAS', 'INVASION' ].includes(l.gamemode.toUpperCase()))) && (!cls[ 2 ] || l.version.toLowerCase().startsWith("v" + cls[ 2 ].replace(/v/gi, '')))));
|
||||||
let l;
|
let l;
|
||||||
do l = randomElement(fLayers); while (rnd_layers.includes(l))
|
do l = randomElement(fLayers); while (rnd_layers.includes(l))
|
||||||
if (l) {
|
if (l) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user