mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
Reset Script module when it is saved
This commit is contained in:
parent
abb5b9895f
commit
9a9096bc70
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
@ -26144,6 +26144,8 @@ Script.prototype.saveScript = function() {
|
|||||||
|
|
||||||
//Calculate/update ram usage, execution time, etc.
|
//Calculate/update ram usage, execution time, etc.
|
||||||
this.updateRamUsage();
|
this.updateRamUsage();
|
||||||
|
|
||||||
|
this.module = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28582,7 +28584,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_19__["SymbolToStockMap"][symbol];
|
var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_19__["SymbolToStockMap"][symbol];
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_23__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
|
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_23__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
|
||||||
}
|
}
|
||||||
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
|
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
|
||||||
},
|
},
|
||||||
|
4
dist/tests.bundle.js
vendored
4
dist/tests.bundle.js
vendored
@ -26144,6 +26144,8 @@ Script.prototype.saveScript = function() {
|
|||||||
|
|
||||||
//Calculate/update ram usage, execution time, etc.
|
//Calculate/update ram usage, execution time, etc.
|
||||||
this.updateRamUsage();
|
this.updateRamUsage();
|
||||||
|
|
||||||
|
this.module = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28582,7 +28584,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_19__["SymbolToStockMap"][symbol];
|
var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_19__["SymbolToStockMap"][symbol];
|
||||||
if (stock == null) {
|
if (stock == null) {
|
||||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_23__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
|
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_23__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
|
||||||
}
|
}
|
||||||
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
|
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
|
||||||
},
|
},
|
||||||
|
@ -345,6 +345,8 @@ Script.prototype.saveScript = function() {
|
|||||||
|
|
||||||
//Calculate/update ram usage, execution time, etc.
|
//Calculate/update ram usage, execution time, etc.
|
||||||
this.updateRamUsage();
|
this.updateRamUsage();
|
||||||
|
|
||||||
|
this.module = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user