Remove stopFlag checks made redundant by the netscriptDelay change

This commit is contained in:
Heikki Aitakangas
2022-01-08 22:04:01 +02:00
parent 59da79a427
commit c6ff982b1d
4 changed files with 0 additions and 22 deletions
-3
View File
@@ -38,9 +38,6 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
if (!fragment) throw helper.makeRuntimeErrorMsg("stanek.charge", `No fragment with root (${rootX}, ${rootY}).`);
const time = staneksGift.inBonus() ? 200 : 1000;
return netscriptDelay(time, workerScript).then(function () {
if (workerScript.env.stopFlag) {
return Promise.reject(workerScript);
}
const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);
workerScript.log("stanek.charge", () => `Charged fragment for ${charge} charge.`);
return Promise.resolve();