My corp infinity safeguard from 2 patch ago wasn't actually preventing it, just logging, now it returns to avoid it.

This commit is contained in:
Olivier Gagnon 2021-08-27 11:18:06 -04:00
parent c9ab7908a7
commit c110c22efb
2 changed files with 4 additions and 2 deletions

File diff suppressed because one or more lines are too long

@ -1947,8 +1947,10 @@ function Corporation(params={}) {
}
Corporation.prototype.addFunds = function(amt) {
if(!isFinite(amt))
if(!isFinite(amt)) {
console.error('Trying to add invalid amount of funds. Report to a developper.');
return;
}
this.funds = this.funds.plus(amt);
}