mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-24 00:13:52 -06:00
added voteBroadcastMessage
This commit is contained in:
parent
09bae31e41
commit
4b0131a8e8
10
README.MD
10
README.MD
@ -97,6 +97,13 @@ vote option to restart the vote with random entries.
|
|||||||
```json
|
```json
|
||||||
false
|
false
|
||||||
```
|
```
|
||||||
|
#### voteBroadcastMessage
|
||||||
|
###### Description
|
||||||
|
Message that is sent as broadcast to announce a vote.
|
||||||
|
###### Default
|
||||||
|
```
|
||||||
|
✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!
|
||||||
|
```
|
||||||
### Example configuration
|
### Example configuration
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -110,6 +117,7 @@ false
|
|||||||
"gamemodeWhitelist": [ "AAS", "RAAS", "Invasion" ],
|
"gamemodeWhitelist": [ "AAS", "RAAS", "Invasion" ],
|
||||||
"layerLevelBlacklist": [ "BlackCoast_Seed" ],
|
"layerLevelBlacklist": [ "BlackCoast_Seed" ],
|
||||||
"hideVotesCount": false,
|
"hideVotesCount": false,
|
||||||
"showRerollOption": false
|
"showRerollOption": false,
|
||||||
|
"voteBroadcastMessage": "✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -89,6 +89,11 @@ export default class MapVote extends BasePlugin {
|
|||||||
required: false,
|
required: false,
|
||||||
description: 'vote option to restart the vote with random entries',
|
description: 'vote option to restart the vote with random entries',
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
voteBroadcastMessage: {
|
||||||
|
required: false,
|
||||||
|
description: 'Message that is sent as broadcast to announce a vote',
|
||||||
|
default: "✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -576,7 +581,7 @@ export default class MapVote extends BasePlugin {
|
|||||||
//Note: broadcast strings with multi lines are very strange
|
//Note: broadcast strings with multi lines are very strange
|
||||||
async broadcastNominations() {
|
async broadcastNominations() {
|
||||||
if (this.nominations.length > 0 && this.votingEnabled) {
|
if (this.nominations.length > 0 && this.votingEnabled) {
|
||||||
await this.broadcast("✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!\n");
|
await this.broadcast(this.options.voteBroadcastMessage);
|
||||||
let nominationStrings = [];
|
let nominationStrings = [];
|
||||||
for (let choice = 1; choice < this.nominations.length; choice++) {
|
for (let choice = 1; choice < this.nominations.length; choice++) {
|
||||||
choice = Number(choice);
|
choice = Number(choice);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user