Stanek performance boost + bonus time rework (#410)

This commit is contained in:
Snarling
2023-03-07 14:45:22 -05:00
committed by GitHub
parent 701f063642
commit 51bf0d1904
2 changed files with 15 additions and 6 deletions
+3 -1
View File
@@ -44,7 +44,9 @@ export function NetscriptStanek(): InternalAPI<IStanek> {
);
}
//Charge the fragment
const time = staneksGift.inBonus() ? 200 : 1000;
const inBonus = staneksGift.inBonus();
const time = inBonus ? 200 : 1000;
if (inBonus) staneksGift.isBonusCharging = true;
return helpers.netscriptDelay(ctx, time).then(function () {
staneksGift.charge(fragment, ctx.workerScript.scriptRef.threads);
helpers.log(ctx, () => `Charged fragment with ${ctx.workerScript.scriptRef.threads} threads.`);