mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-24 02:33:52 -06:00
added apply blacklist to whitelist option
This commit is contained in:
parent
c8370673d5
commit
9c753932aa
@ -98,6 +98,13 @@ The random layer list will NOT include the blacklisted layers or levels. (accept
|
|||||||
```
|
```
|
||||||
[]
|
[]
|
||||||
```
|
```
|
||||||
|
#### applyBlacklistToWhitelist
|
||||||
|
###### Description
|
||||||
|
If set to true the blacklisted layers will be filtered out also in whitelist mode.
|
||||||
|
###### Default
|
||||||
|
```json
|
||||||
|
true
|
||||||
|
```
|
||||||
#### hideVotesCount
|
#### hideVotesCount
|
||||||
###### Description
|
###### Description
|
||||||
Hides the number of votes a layer received in broadcast message.
|
Hides the number of votes a layer received in broadcast message.
|
||||||
|
11
mapvote.js
11
mapvote.js
@ -80,6 +80,11 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
description: 'random layer list will not include the blacklisted layers or levels. (acceptable formats: Gorodok/Gorodok_RAAS/Gorodok_AAS_v1)',
|
description: 'random layer list will not include the blacklisted layers or levels. (acceptable formats: Gorodok/Gorodok_RAAS/Gorodok_AAS_v1)',
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
|
applyBlacklistToWhitelist: {
|
||||||
|
required: false,
|
||||||
|
description: 'if set to true the blacklisted layers won\'t be included also in whitelist mode',
|
||||||
|
default: true
|
||||||
|
},
|
||||||
hideVotesCount: {
|
hideVotesCount: {
|
||||||
required: false,
|
required: false,
|
||||||
description: 'hides the number of votes a layer received in broadcast message',
|
description: 'hides the number of votes a layer received in broadcast message',
|
||||||
@ -465,7 +470,11 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
![ this.server.currentLayer ? this.server.currentLayer.map.name : null, ...recentlyPlayedMaps ].includes(l.map.name) &&
|
![ this.server.currentLayer ? this.server.currentLayer.map.name : null, ...recentlyPlayedMaps ].includes(l.map.name) &&
|
||||||
(
|
(
|
||||||
(this.options.layerFilteringMode.toLowerCase() == "blacklist" && !this.options.layerLevelBlacklist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase()))) ||
|
(this.options.layerFilteringMode.toLowerCase() == "blacklist" && !this.options.layerLevelBlacklist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase()))) ||
|
||||||
(this.options.layerFilteringMode.toLowerCase() == "whitelist" && this.options.layerLevelWhitelist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase())))
|
(
|
||||||
|
this.options.layerFilteringMode.toLowerCase() == "whitelist"
|
||||||
|
&& this.options.layerLevelWhitelist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase()))
|
||||||
|
&& !(this.options.applyBlacklistToWhitelist && this.options.layerLevelBlacklist.find((fl) => l.layerid.toLowerCase().startsWith(fl.toLowerCase())))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
for (let i = 1; i <= maxOptions; i++) {
|
for (let i = 1; i <= maxOptions; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user