mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 16:03:53 -06:00
update mapvote
This commit is contained in:
parent
025e347ba5
commit
ab8d914ab3
@ -693,7 +693,7 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
// this.verbose(1, 'rnd_layers', rnd_layers.map(l => l.layerid));
|
||||
let l;
|
||||
let maxtries = 10;
|
||||
do l = randomElement(fLayers); while ((rnd_layers.filter(lf => lf.map.name === l.map.name).length > (this.options.allowedSameMapEntries - 1)) && --maxtries >= 0)
|
||||
do l = randomElement(fLayers); while ((rnd_layers.filter(lf => lf.map.name === l.map.name).length > (this.options.allowedSameMapEntries - 1)) && --maxtries >= 0 && !rnd_layers.find((e) => e === l))
|
||||
if (l) {
|
||||
rnd_layers.push(l);
|
||||
this.nominations[i] = l.layerid
|
||||
|
Loading…
x
Reference in New Issue
Block a user