mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
CODEBASE: Add more debug info for troubleshooting corporation issues (#2327)
This commit is contained in:
@@ -161,9 +161,11 @@ export class Division {
|
||||
//Then calculate salaries and process the markets
|
||||
if (state === "START") {
|
||||
if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {
|
||||
console.error("NaN in Corporation's computed revenue/expenses");
|
||||
dialogBoxCreate(
|
||||
"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer",
|
||||
exceptionAlert(
|
||||
new Error(
|
||||
`Invalid revenue/expenses. thisCycleRevenue: ${this.thisCycleRevenue}. thisCycleExpenses: ${this.thisCycleExpenses}`,
|
||||
),
|
||||
true,
|
||||
);
|
||||
this.thisCycleRevenue = 0;
|
||||
this.thisCycleExpenses = 0;
|
||||
|
||||
@@ -65,7 +65,10 @@ export class Warehouse {
|
||||
this.sizeUsed += mat.stored * MaterialInfo[matName].size;
|
||||
}
|
||||
if (this.sizeUsed > this.size) {
|
||||
console.warn("Warehouse size used greater than capacity, something went wrong");
|
||||
console.warn(
|
||||
`Warehouse size used greater than capacity, something went wrong. sizeUsed: ${this.sizeUsed}. size: ${this.size}`,
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user