mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
All v0.26.0 changes
This commit is contained in:
+9
-1
@@ -187,6 +187,8 @@ function calculateRamUsage(codeCopy) {
|
||||
numOccurrences(codeCopy, "sellStock(");
|
||||
var scriptPurchaseServerCount = numOccurrences(codeCopy, "purchaseServer(");
|
||||
var scriptRoundCount = numOccurrences(codeCopy, "round(");
|
||||
var scriptWriteCount = numOccurrences(codeCopy, "write(");
|
||||
var scriptReadCount = numOccurrences(codeCopy, "read(");
|
||||
|
||||
return baseRam +
|
||||
((whileCount * CONSTANTS.ScriptWhileRamCost) +
|
||||
@@ -224,7 +226,9 @@ function calculateRamUsage(codeCopy) {
|
||||
(scriptGetStockCount * CONSTANTS.ScriptGetStockRamCost) +
|
||||
(scriptBuySellStockCount * CONSTANTS.ScriptBuySellStockRamCost) +
|
||||
(scriptPurchaseServerCount * CONSTANTS.ScriptPurchaseServerRamCost) +
|
||||
(scriptRoundCount * CONSTANTS.ScriptRoundRamCost));
|
||||
(scriptRoundCount * CONSTANTS.ScriptRoundRamCost) +
|
||||
(scriptWriteCount * CONSTANTS.ScriptReadWriteRamCost) +
|
||||
(scriptReadCount * CONSTANTS.ScriptReadWriteRamCost));
|
||||
}
|
||||
|
||||
Script.prototype.toJSON = function() {
|
||||
@@ -416,6 +420,10 @@ RunningScript.prototype.displayLog = function() {
|
||||
post(this.logs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
RunningScript.prototype.clearLog = function() {
|
||||
this.logs.length = 0;
|
||||
}
|
||||
|
||||
//Update the moneyStolen and numTimesHack maps when hacking
|
||||
RunningScript.prototype.recordHack = function(serverIp, moneyGained, n=1) {
|
||||
|
||||
Reference in New Issue
Block a user