mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 23:03:51 -06:00
made it so that config rules load in alphabetical order
This commit is contained in:
parent
b1c80d1266
commit
1349f62893
@ -332,9 +332,13 @@
|
|||||||
modes_list.innerHTML = "";
|
modes_list.innerHTML = "";
|
||||||
reader.addEventListener("load", (event) => {
|
reader.addEventListener("load", (event) => {
|
||||||
let vote_rules = JSON.parse(event.target.result);
|
let vote_rules = JSON.parse(event.target.result);
|
||||||
|
|
||||||
for (let mode of vote_rules.modes)
|
for (let mode of vote_rules.modes)
|
||||||
add_mode(mode);
|
add_mode(mode);
|
||||||
for (let rule in vote_rules.rules)
|
|
||||||
|
let rules = Object.keys(vote_rules.rules).sort()
|
||||||
|
|
||||||
|
for (let rule of rules)
|
||||||
{
|
{
|
||||||
let rule_element = build_rule_element();
|
let rule_element = build_rule_element();
|
||||||
rule_element.rule_string_input.value = rule;
|
rule_element.rule_string_input.value = rule;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user