added bailout

This commit is contained in:
Jack 2020-08-12 01:55:38 +01:00
parent 2d27d7f4ea
commit b0a5145a66
2 changed files with 17 additions and 4 deletions

View file

@ -303,20 +303,30 @@ let commands = {
{
id: "bailOut",
display: "Bail out...",
subgroup: true,
visible: false,
exec: () => {
currentCommands = {
currentCommands.push({
title: "Are you sure...",
list: [
{
id: "bailOutNo",
display: "Nevermind",
exec: () => {
hideCommandLine();
},
},
{
id: "bailOutForSure",
display: "Yes, im sure",
display: "Yes, I am sure",
exec: () => {
bailout = true;
showResult();
},
},
],
};
});
showCommandLine();
},
},
{
@ -1169,7 +1179,7 @@ function updateSuggestedCommands() {
}
});
if (foundcount > 0) {
if (obj.visible !== false) obj.found = true;
obj.found = true;
} else {
obj.found = false;
}

View file

@ -1497,6 +1497,8 @@ function showResult(difficultyFailed = false) {
let afkDetected = kps === 0 ? true : false;
if (bailout) afkDetected = false;
if (difficultyFailed) {
showNotification("Test failed", 2000);
} else if (afkDetected) {
@ -1537,6 +1539,7 @@ function showResult(difficultyFailed = false) {
consistency: consistency,
keyConsistency: keyConsistency,
funbox: activeFunBox,
bailedOut: bailout,
};
if (
config.difficulty == "normal" ||