mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
fix exploit duplicate
This commit is contained in:
parent
a3346719a0
commit
2cf3d640bb
@ -61,7 +61,7 @@ v1.0.0 - 2021-11-10 Breaking the API :( (blame hydroflame)
|
||||
* Button colors can be edited.
|
||||
* Added 2 new colors in the theme editor: background primary and background secondary.
|
||||
* infiltration uses key instead of keycode so it should work better on non-american keyboards.
|
||||
* nerf noodle bar.
|
||||
* buff noodle bar.
|
||||
|
||||
v0.58.0 - 2021-10-27 Road to Steam (hydroflame & community)
|
||||
-----------------------------------------------------------
|
||||
|
@ -42,5 +42,6 @@ export function ExploitName(exploit: string): string {
|
||||
}
|
||||
|
||||
export function sanitizeExploits(exploits: Exploit[]): Exploit[] {
|
||||
return exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));
|
||||
exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));
|
||||
return [...new Set(exploits)];
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { Player } from "../Player";
|
||||
import { sanitizeExploits } from "./Exploit";
|
||||
|
||||
export function applyExploit(): void {
|
||||
if (Player.exploits && Player.exploits.length === 0) {
|
||||
return;
|
||||
}
|
||||
Player.exploits = sanitizeExploits(Player.exploits);
|
||||
const inc = Math.pow(1.001, Player.exploits.length);
|
||||
const dec = Math.pow(0.999, Player.exploits.length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user