mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 23:03:51 -06:00
made it so that plugin will fall back to defualt vote options when layer is not found
This commit is contained in:
parent
aaa4332826
commit
8fea07655d
10
mapvote.js
10
mapvote.js
@ -273,16 +273,12 @@ export default class MapVote extends BasePlugin
|
|||||||
const splitName = name => name.substring(0, name.lastIndexOf("_"));
|
const splitName = name => name.substring(0, name.lastIndexOf("_"));
|
||||||
const removeCAF = name => name.replace("CAF_", "");
|
const removeCAF = name => name.replace("CAF_", "");
|
||||||
|
|
||||||
if (!this.server.currentLayer)
|
let layerString = "";
|
||||||
{
|
if (this.server.currentLayer)
|
||||||
this.verbose(1, "Error: unknown currentLayer");
|
layerString = this.server.currentLayer.layerid
|
||||||
endVoting();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.nominations = [];
|
this.nominations = [];
|
||||||
const rulesList = this.voteRules.rules;
|
const rulesList = this.voteRules.rules;
|
||||||
let layerString = this.server.currentLayer.layerid;
|
|
||||||
let nominationsList = rulesList.default;
|
let nominationsList = rulesList.default;
|
||||||
|
|
||||||
//chomp string until we find a match
|
//chomp string until we find a match
|
||||||
|
Loading…
x
Reference in New Issue
Block a user