mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
Persist terminal command history in game save
Copy the terminal commands into the player object so that they are saved between game reloads. Adds a 'history' command to display history, and a 'history -c' command to clear it from both the current terminal & the player's save.
This commit is contained in:
@@ -77,6 +77,7 @@ export class PlayerObject implements IPlayer {
|
||||
sourceFiles: IPlayerOwnedSourceFile[];
|
||||
exploits: Exploit[];
|
||||
achievements: PlayerAchievement[];
|
||||
terminalCommandHistory: string[];
|
||||
lastUpdate: number;
|
||||
totalPlaytime: number;
|
||||
|
||||
@@ -471,6 +472,7 @@ export class PlayerObject implements IPlayer {
|
||||
|
||||
this.exploits = [];
|
||||
this.achievements = [];
|
||||
this.terminalCommandHistory = [];
|
||||
|
||||
this.init = generalMethods.init;
|
||||
this.prestigeAugmentation = generalMethods.prestigeAugmentation;
|
||||
|
||||
Reference in New Issue
Block a user