mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 13:43:52 -06:00
change how nominations filtering works and how layer blacklist and whitelist are parsed
This commit is contained in:
parent
e770b5c4af
commit
2ebbb6aa40
@ -864,7 +864,7 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
getLayersFromStringId(stringid) {
|
||||
// const cls = stringid.toLowerCase().split('_');
|
||||
const modLayers = this.layerfilterCorrectLayers(Layers.layers);
|
||||
const ret = modLayers.filter(l => l.layerid.toLowerCase().contains(stringid.replace(/\*/gi,'').toLowerCase()));
|
||||
const ret = modLayers.filter(l => l.layerid.toLowerCase().includes(stringid.replace(/\*/gi,'').toLowerCase()));
|
||||
// const ret = modLayers.filter((l) => ((cls[0] === "*" || l.layerid.toLowerCase().startsWith(cls[0])) && (l.gamemode.toLowerCase().startsWith(cls[1]) || (!cls[1] && ['RAAS', 'AAS', 'INVASION'].includes(l.gamemode.toUpperCase()))) && (!cls[2] || parseInt(l.version.toLowerCase().replace(/v/gi, '')) == parseInt(cls[2].replace(/v/gi, '')))));
|
||||
// this.verbose(1,"layers from string",stringid,cls,ret)
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user