mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-13 03:03:54 +01:00
fix import and make rainbow return the answer.
This commit is contained in:
parent
52e27e317e
commit
7685f52f8e
@ -59,17 +59,20 @@ export function NetscriptExtra(player: IPlayer, workerScript: WorkerScript, help
|
|||||||
player.giveExploit(Exploit.RealityAlteration);
|
player.giveExploit(Exploit.RealityAlteration);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rainbow: function (guess: unknown): void {
|
rainbow: function (guess: unknown): boolean {
|
||||||
async function tryGuess(): Promise<void> {
|
function tryGuess(): boolean {
|
||||||
const verified = await bcrypt.compare(
|
// eslint-disable-next-line no-sync
|
||||||
|
const verified = bcrypt.compareSync(
|
||||||
helper.string("rainbow", "guess", guess),
|
helper.string("rainbow", "guess", guess),
|
||||||
"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO",
|
"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO",
|
||||||
);
|
);
|
||||||
if (verified) {
|
if (verified) {
|
||||||
player.giveExploit(Exploit.INeedARainbow);
|
player.giveExploit(Exploit.INeedARainbow);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
tryGuess();
|
return tryGuess();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ import { ISkillProgress } from "../formulas/skill";
|
|||||||
import { PlayerAchievement } from "../../Achievements/Achievements";
|
import { PlayerAchievement } from "../../Achievements/Achievements";
|
||||||
import { cyrb53 } from "../../utils/StringHelperFunctions";
|
import { cyrb53 } from "../../utils/StringHelperFunctions";
|
||||||
import { getRandomInt } from "../../utils/helpers/getRandomInt";
|
import { getRandomInt } from "../../utils/helpers/getRandomInt";
|
||||||
import { CONSTANTS } from "src/Constants";
|
import { CONSTANTS } from "../../Constants";
|
||||||
|
|
||||||
export class PlayerObject implements IPlayer {
|
export class PlayerObject implements IPlayer {
|
||||||
// Class members
|
// Class members
|
||||||
|
Loading…
Reference in New Issue
Block a user