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