mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
Hotfix corp mku getting set to zero and causing infinity
This commit is contained in:
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -1126,6 +1126,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var maxSell = 0.5
|
var maxSell = 0.5
|
||||||
* Math.pow(product.rat, 0.65)
|
* Math.pow(product.rat, 0.65)
|
||||||
* marketFactor
|
* marketFactor
|
||||||
|
|||||||
@@ -187,6 +187,11 @@ export class Product {
|
|||||||
this.calculateRating(industry);
|
this.calculateRating(industry);
|
||||||
const advMult = 1 + (Math.pow(this.advCost, 0.1) / 100);
|
const advMult = 1 + (Math.pow(this.advCost, 0.1) / 100);
|
||||||
this.mku = 100 / (advMult * Math.pow((this.qlt + 0.001), 0.65) * (busRatio + mgmtRatio));
|
this.mku = 100 / (advMult * Math.pow((this.qlt + 0.001), 0.65) * (busRatio + mgmtRatio));
|
||||||
|
|
||||||
|
// I actually don't understand well enough to know if this is right.
|
||||||
|
// I'm adding this to prevent a crash.
|
||||||
|
if(this.mku === 0) this.mku = 1;
|
||||||
|
|
||||||
this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));
|
this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));
|
||||||
this.cmp = getRandomInt(0, 70);
|
this.cmp = getRandomInt(0, 70);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user