mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
Fixed bugs with Sleeve mechanics. Updated documentation to use RTD theme
This commit is contained in:
@@ -548,6 +548,14 @@ PlayerObject.prototype.loseMoney = function(money) {
|
||||
this.money = this.money.minus(money);
|
||||
}
|
||||
|
||||
PlayerObject.prototype.canAfford = function(cost) {
|
||||
if (isNaN(cost)) {
|
||||
console.error(`NaN passed into Player.canAfford()`);
|
||||
return false;
|
||||
}
|
||||
return this.money.gte(cost);
|
||||
}
|
||||
|
||||
PlayerObject.prototype.gainHackingExp = function(exp) {
|
||||
if (isNaN(exp)) {
|
||||
console.log("ERR: NaN passed into Player.gainHackingExp()"); return;
|
||||
|
||||
Reference in New Issue
Block a user