mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
allowing pbs with plus one and plus. closes #1566
This commit is contained in:
parent
590a40b4a9
commit
acbb4597b6
2 changed files with 10 additions and 4 deletions
|
@ -477,7 +477,11 @@ async function checkIfPB(uid, obj, userdata) {
|
|||
if (obj.mode == "quote") {
|
||||
return false;
|
||||
}
|
||||
if (obj.funbox !== "none") {
|
||||
if (
|
||||
obj.funbox !== "none" &&
|
||||
obj.funbox !== "plus_one" &&
|
||||
obj.funbox !== "plus_two"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -478,14 +478,14 @@ export async function init() {
|
|||
(wordset.length < 3 || PractiseMissed.before.mode !== null)
|
||||
) {
|
||||
randomWord = wordset[Math.floor(Math.random() * wordset.length)];
|
||||
} else {
|
||||
} else {
|
||||
while (
|
||||
randomWord == previousWord ||
|
||||
randomWord == previousWord2 ||
|
||||
(!Config.punctuation && randomWord == "I") ||
|
||||
randomWord.indexOf(" ") > -1
|
||||
) {
|
||||
console.log('rerandomising');
|
||||
console.log("rerandomising");
|
||||
randomWord = wordset[Math.floor(Math.random() * wordset.length)];
|
||||
}
|
||||
}
|
||||
|
@ -1600,7 +1600,9 @@ export function finish(difficultyFailed = false) {
|
|||
}
|
||||
});
|
||||
if (
|
||||
completedEvent.funbox === "none" &&
|
||||
(completedEvent.funbox === "none" ||
|
||||
completedEvent.funbox === "plus_one" ||
|
||||
completedEvent.funbox === "plus_two") &&
|
||||
completedEvent.language === "english" &&
|
||||
completedEvent.mode === "time" &&
|
||||
["15", "60"].includes(String(completedEvent.mode2))
|
||||
|
|
Loading…
Reference in a new issue