mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
fix ns1 scripts
This commit is contained in:
parent
ca2e22506b
commit
cb7f3b17be
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
extends: [
|
extends: [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||||
],
|
],
|
||||||
parser: "@typescript-eslint/parser",
|
parser: "@typescript-eslint/parser",
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
@ -104,7 +104,10 @@ function wrapFunction(
|
|||||||
helpers.updateDynamicRam(ctx.function, getRamCost(Player, ...tree, ctx.function));
|
helpers.updateDynamicRam(ctx.function, getRamCost(Player, ...tree, ctx.function));
|
||||||
if (safetyEnabled) {
|
if (safetyEnabled) {
|
||||||
const now = performance.now();
|
const now = performance.now();
|
||||||
if (now - workerScript.infiniteLoopSafety > CONSTANTS.InfiniteLoopLimit) {
|
if (
|
||||||
|
now - workerScript.infiniteLoopSafety > CONSTANTS.InfiniteLoopLimit &&
|
||||||
|
workerScript.scriptRef.filename.endsWith(".js")
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Potential infinite loop without sleep detected. The game spent ${CONSTANTS.InfiniteLoopLimit}ms stuck in this script. (Are you using 'asleep' by mistake?)`,
|
`Potential infinite loop without sleep detected. The game spent ${CONSTANTS.InfiniteLoopLimit}ms stuck in this script. (Are you using 'asleep' by mistake?)`,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user