mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 05:33:54 +01:00
Hotfix corp mku getting set to zero and causing infinity
This commit is contained in:
parent
e2d74f9432
commit
ceb4e304fd
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
|
||||
* Math.pow(product.rat, 0.65)
|
||||
* marketFactor
|
||||
|
@ -187,6 +187,11 @@ export class Product {
|
||||
this.calculateRating(industry);
|
||||
const advMult = 1 + (Math.pow(this.advCost, 0.1) / 100);
|
||||
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.cmp = getRandomInt(0, 70);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user