mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 06:17:04 +02:00
Merge pull request #2641 from MartinFournier/feature/save-command-history
Copy terminal command history into game save
This commit is contained in:
@@ -48,6 +48,7 @@ import { free } from "./commands/free";
|
||||
import { grow } from "./commands/grow";
|
||||
import { hack } from "./commands/hack";
|
||||
import { help } from "./commands/help";
|
||||
import { history } from "./commands/history";
|
||||
import { home } from "./commands/home";
|
||||
import { hostname } from "./commands/hostname";
|
||||
import { kill } from "./commands/kill";
|
||||
@@ -576,6 +577,7 @@ export class Terminal implements ITerminal {
|
||||
if (this.commandHistory.length > 50) {
|
||||
this.commandHistory.splice(0, 1);
|
||||
}
|
||||
player.terminalCommandHistory = this.commandHistory;
|
||||
}
|
||||
this.commandHistoryIndex = this.commandHistory.length;
|
||||
const allCommands = ParseCommands(commands);
|
||||
@@ -785,6 +787,7 @@ export class Terminal implements ITerminal {
|
||||
grow: grow,
|
||||
hack: hack,
|
||||
help: help,
|
||||
history: history,
|
||||
home: home,
|
||||
hostname: hostname,
|
||||
kill: kill,
|
||||
|
||||
Reference in New Issue
Block a user