Vigilante Justice now reduces wanted by a percentage to help players stuck with very high wanted level.

This commit is contained in:
Olivier Gagnon
2021-05-29 12:48:58 -04:00
parent 75b2806c93
commit 60d6d49c43
15 changed files with 29 additions and 39 deletions
+2 -3
View File
@@ -175,7 +175,7 @@ export class CodingContract {
async prompt(): Promise<CodingContractResult> {
const popupId = `coding-contract-prompt-popup-${this.fn}`;
return new Promise<CodingContractResult>((resolve, reject) => {
let popup = new CodingContractPopup({
const popup = new CodingContractPopup({
c: this,
popupId: popupId,
onClose: () => {
@@ -183,14 +183,13 @@ export class CodingContract {
removePopup(popupId);
},
onAttempt: (val: string) => {
console.log(`top; ${val}`);
if (this.isSolution(val)) {
resolve(CodingContractResult.Success);
} else {
resolve(CodingContractResult.Failure);
}
removePopup(popupId);
}
},
});
createPopup(popupId, CodingContractPopup, popup.props);
});