mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Fixed Corporation bugs with Product Sell Amt being negative and NSA Bladeburner button bug
This commit is contained in:
parent
9c5af1d3a7
commit
2f716b5b23
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -1521,6 +1521,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio
|
||||
//Backwards compatibility, -1 = 0
|
||||
sellAmt = maxSell;
|
||||
}
|
||||
if (sellAmt < 0) { sellAmt = 0; }
|
||||
sellAmt = sellAmt * SecsPerMarketCycle * marketCycles;
|
||||
sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty
|
||||
if (sellAmt && sCost) {
|
||||
@ -3096,7 +3097,9 @@ Corporation.prototype.process = function() {
|
||||
if (state === "START") {
|
||||
this.revenue = new Decimal(0);
|
||||
this.expenses = new Decimal(0);
|
||||
this.divisions.forEach((ind)=>{
|
||||
this.divisions.forEach((ind) => {
|
||||
if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) { return; }
|
||||
if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) { return; }
|
||||
this.revenue = this.revenue.plus(ind.lastCycleRevenue);
|
||||
this.expenses = this.expenses.plus(ind.lastCycleExpenses);
|
||||
});
|
||||
|
@ -113,7 +113,7 @@ function displayLocationContent() {
|
||||
|
||||
var cityHallCreateCorporation = document.getElementById("location-cityhall-create-corporation");
|
||||
|
||||
var nsaBladeburner = clearEventListeners("location-nsa-bladeburner");
|
||||
var nsaBladeburner = document.getElementById("location-nsa-bladeburner");
|
||||
|
||||
var loc = Player.location;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user