Autumn meatgrinder

This commit is contained in:
Viktor Kholodov
2021-09-25 03:14:47 +03:00
parent e71480c1f7
commit 52baef061b
5 changed files with 51 additions and 18 deletions
+23 -2
View File
@@ -270,6 +270,10 @@ function renderPlayersAndStats(lobby) {
var last5Selected = "";
var superfinalSelected = "";
var looserPickSelected = "";
var isNecronsSelected = "";
if(lobby.isNecrons) isNecronsSelected = "checked";
switch (lobby.selectedType) {
case "Last3()":
last3Selected = "selected";
@@ -309,10 +313,19 @@ function renderPlayersAndStats(lobby) {
disabledText = "disabled";
}
resHtml += "<br/><select class=\"form-control\" id = 'deciderOption' onChange='changeLobbyType()' "+disabledText+" >" +
"<option "+looserPickSelected+" value = 'looserpick'>Play on last map (BO1)</option>" +
"<option "+last3Selected+" value = 'last3'>Play on last 3 maps (BO3)</option>" +
"<option "+last5Selected+" value = 'last5'>Play on last 5 maps (BO5)</option>" +
"<option "+superfinalSelected+" value = 'superfinal'>Superfinal (BO7)</option>" +
"</select>"
//"<option "+superfinalSelected+" value = 'superfinal'>Superfinal (BO7)</option>" +
"</select>";
if(lobby.user1Info.name !== userName && lobby.user2Info.name !== userName){
disabledText = "disabled";
}else{
disabledText = "";
}
resHtml += "<br/><label><input onchange=\"changeIsNecronSelected()\" id='isNecron' type=\"checkbox\" "+isNecronsSelected +" " + disabledText +">" +
" Necrons are present</label>";
resHtml += "</div>";
break;
case "Draft()":
@@ -377,6 +390,14 @@ function changeLobbyType(){
}));
}
function changeIsNecronSelected(){
var isNecronSelected = $("#isNecron").is(':checked');
ws.send(JSON.stringify({
type: "changeIsNecronSelected",
isNecronSelected: isNecronSelected
}));
}
function joinDecider(actorName){
ws.send(JSON.stringify({
type: "joinDecider",