mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 05:47:14 +02:00
Can now do things such as ctrl+c in Terminal without it auto focusing on the input. Implemented offline exp gain
This commit is contained in:
@@ -69,6 +69,9 @@ function PlayerObject() {
|
||||
//Flag to let the engine know the player is starting a hack
|
||||
this.startAction = false;
|
||||
this.actionTime = 0;
|
||||
|
||||
//Used to store the last update time.
|
||||
this.lastUpdate = new Date().getTime();
|
||||
};
|
||||
|
||||
PlayerObject.prototype.init = function() {
|
||||
@@ -167,6 +170,12 @@ PlayerObject.prototype.analyze = function() {
|
||||
this.startAction = true;
|
||||
}
|
||||
|
||||
PlayerObject.prototype.gainMoney = function(money) {
|
||||
this.money += money;
|
||||
this.total_money += money;
|
||||
this.lifetime_money += money;
|
||||
}
|
||||
|
||||
//Functions for saving and loading the Player data
|
||||
PlayerObject.prototype.toJSON = function() {
|
||||
return Generic_toJSON("PlayerObject", this);
|
||||
|
||||
Reference in New Issue
Block a user