mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
Fixed several more bugs. Rebalanced stock market changes to make the effects a bit less potent for now
This commit is contained in:
@@ -2164,10 +2164,17 @@ function NetscriptFunctions(workerScript) {
|
||||
getScriptIncome: function(scriptname, ip) {
|
||||
updateDynamicRam("getScriptIncome", getRamCost("getScriptIncome"));
|
||||
if (arguments.length === 0) {
|
||||
// Get total script income
|
||||
var res = [];
|
||||
res.push(updateActiveScriptsItems());
|
||||
res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug/1000));
|
||||
|
||||
// First element is total income of all currently running scripts
|
||||
let total = 0;
|
||||
for (const script of workerScripts) {
|
||||
total += (script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime);
|
||||
}
|
||||
res.push(total);
|
||||
|
||||
// Second element is total income you've earned from scripts since you installed Augs
|
||||
res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000));
|
||||
return res;
|
||||
} else {
|
||||
// Get income for a particular script
|
||||
|
||||
Reference in New Issue
Block a user