mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 00:04:22 +02:00
Added more error line numbers to JS Interpreter. Reputation needed for megacorp faction reduced from 250k -> 200k. Fixed bladeburner.getActionobject() bug with general actions
This commit is contained in:
@@ -300,7 +300,9 @@ function NetscriptFunctions(workerScript) {
|
||||
const percentHacked = scriptCalculatePercentMoneyHacked(server);
|
||||
let maxThreadNeeded = Math.ceil(1/percentHacked*(server.moneyAvailable/server.moneyMax));
|
||||
if (isNaN(maxThreadNeeded)) {
|
||||
maxThreadNeeded = 1e6; //Server has a 'max money' of 0 (probably)
|
||||
//Server has a 'max money' of 0 (probably).
|
||||
//We'll set this to an arbitrarily large value
|
||||
maxThreadNeeded = 1e6;
|
||||
}
|
||||
|
||||
let moneyGained = Math.floor(server.moneyAvailable * percentHacked) * threads;
|
||||
@@ -3046,7 +3048,7 @@ function NetscriptFunctions(workerScript) {
|
||||
|
||||
const crime = findCrime(crimeRoughName.toLowerCase());
|
||||
if(crime == null) { // couldn't find crime
|
||||
throw makeRuntimeRejectMsg(workerScript, "Invalid crime passed into commitCrime(): " + crime);
|
||||
throw makeRuntimeRejectMsg(workerScript, "Invalid crime passed into commitCrime(): " + crimeRoughName);
|
||||
}
|
||||
if(workerScript.disableLogs.ALL == null && workerScript.disableLogs.commitCrime == null) {
|
||||
workerScript.scriptRef.log("Attempting to commit crime: "+crime.name+"...");
|
||||
|
||||
Reference in New Issue
Block a user