mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
prevent DreamSense from pushing over max
This commit is contained in:
parent
e245cc471a
commit
abdc786403
@ -435,10 +435,19 @@ export class Industry implements IIndustry {
|
|||||||
const popularityGain = corporation.getDreamSenseGain(),
|
const popularityGain = corporation.getDreamSenseGain(),
|
||||||
awarenessGain = popularityGain * 4;
|
awarenessGain = popularityGain * 4;
|
||||||
if (popularityGain > 0) {
|
if (popularityGain > 0) {
|
||||||
this.popularity += popularityGain * marketCycles;
|
if (this.awareness === Number.MAX_VALUE || this.awareness + (awarenessGain * marketCycles) > Number.MAX_VALUE) {
|
||||||
|
this.awareness == Number.MAX_VALUE;
|
||||||
|
} else {
|
||||||
this.awareness += awarenessGain * marketCycles;
|
this.awareness += awarenessGain * marketCycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.popularity === Number.MAX_VALUE || this.popularity + (popularityGain * marketCycles) > Number.MAX_VALUE) {
|
||||||
|
this.popularity == Number.MAX_VALUE;
|
||||||
|
} else {
|
||||||
|
this.popularity += popularityGain * marketCycles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user