Fixed a performance issue when installing too many Neuroflux at once.

This commit is contained in:
Olivier Gagnon
2021-06-13 11:05:07 -04:00
parent 2b1ec7d573
commit 39b4048603
5 changed files with 36 additions and 8 deletions

View File

@@ -394,6 +394,7 @@ export function loseMoney(money) {
console.error("NaN passed into Player.loseMoney()");
return;
}
if(this.money.eq(Infinity) && money === Infinity) return;
this.money = this.money.minus(money);
}