diff --git a/css/terminal.scss b/css/terminal.scss
index ac26b9b3d..7e7ea52bc 100644
--- a/css/terminal.scss
+++ b/css/terminal.scss
@@ -50,6 +50,12 @@
display: flex;
}
+#terminal-input-td textarea {
+ overflow: hidden;
+ resize:none;
+ height:auto;
+}
+
#terminal-input-header {
white-space: pre;
}
diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index 1d3ec509a..5cf080c28 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -17,9 +17,9 @@ v0.40.2 - 8/27/2018
* There are now, on average, more Synthoid communities in a city
* If automation is enabled (the feature in Bladeburner console), then switching to another action such as working for a company will now disable the automation
* Stock Market Changes:
- *Added a watchlist filter feature to the UI that allows you to specify which stocks to show
- *Added the Four Sigma (4S) Market Data feed, which provides volatility and price forecast information about stocks
- *Added the 4S Market Data TIX API, which lets you access the aforementioned data through Netscript
+ * Added a watchlist filter feature to the UI that allows you to specify which stocks to show
+ * Added the Four Sigma (4S) Market Data feed, which provides volatility and price forecast information about stocks
+ * Added the 4S Market Data TIX API, which lets you access the aforementioned data through Netscript
* There is now a setting for enabling/disabling the popup that appears when you are hospitalized
* Bug Fix: Stock market should now be correctly initialized in BitNode-8 (by Kline-)
* Bug Fix: bladeburner.getCurrentAction() should now properly an 'Idle' object rather than null (by Kline-)
diff --git a/netscript.js b/netscript.js
index b632dfdaa..8d7e2ec16 100644
--- a/netscript.js
+++ b/netscript.js
@@ -101,7 +101,7 @@ let NetscriptFunctions =
"getActionMaxLevel|getActionCurrentLevel|getActionAutolevel|" +
"setActionAutolevel|setActionLevel|" +
"getRank|getSkillPoints|getSkillLevel|getSkillUpgradeCost|" +
- "upgradeSkill|getTeamSize|" +
+ "upgradeSkill|getTeamSize|getCity|" +
"setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|" +
"getCityChaos|switchCity|getStamina|joinBladeburnerFaction|getBonusTime";
diff --git a/package-lock.json b/package-lock.json
index 3d8a37dd1..7831b8bea 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -608,6 +608,11 @@
"postcss-value-parser": "3.3.0"
}
},
+ "autosize": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/autosize/-/autosize-4.0.2.tgz",
+ "integrity": "sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA=="
+ },
"aws-sign2": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
diff --git a/package.json b/package.json
index 84d48e9fe..beba2a4e3 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"ajv": "^5.1.5",
"ajv-keywords": "^2.0.0",
"async": "^2.6.1",
+ "autosize": "^4.0.2",
"bluebird": "^3.5.1",
"brace": "^0.11.1",
"decimal.js": "7.2.3",
diff --git a/src/Constants.js b/src/Constants.js
index e85f3e47e..c3f0d8386 100644
--- a/src/Constants.js
+++ b/src/Constants.js
@@ -493,32 +493,8 @@ let CONSTANTS = {
"World Stock Exchange account and TIX API Access
",
LatestUpdate:
- "v0.40.2
" +
- "------------------------------
" +
- "* Bladeburner Changes:
" +
- "*** Added getBonusTime(), getSkillUpgradeCost(), and getCity() Netscript functions to the API
" +
- "*** Buffed the effects of many Bladeburner Augmentations
" +
- "*** The Blade's Simulacrum Augmentation requires significantly less reputation but slightly more money
" +
- "*** Slightly increased the amount of successes needed for a Contract/Operation in order to increase its max level
" +
- "*** Increased the amount of money gained from Contracts by ~25%
" +
- "*** Increased the base amount of rank gained from Operations by 10%
" +
- "*** Significantly increased the 'randomness' in determining a Contract/Operation's initial count and rate of count increase
" +
- "*** The number (count) of Operations should now increase significantly faster
" +
- "*** There are now, on average, more Synthoid communities in a city
" +
- "*** If automation is enabled (the feature in Bladeburner console), then switching to another action such as working for a company will now disable the automation
" +
- "------------------------------
" +
- "* Stock Market Changes:
" +
- "***Added a watchlist filter feature to the UI that allows you to specify which stocks to show
" +
- "***Added the Four Sigma (4S) Market Data feed, which provides volatility and price forecast information about stocks
" +
- "***Added the 4S Market Data TIX API, which lets you access the aforementioned data through Netscript
" +
- "------------------------------
" +
- "* There is now a setting for enabling/disabling the popup that appears when you are hospitalized
" +
- "* Bug Fix: Stock market should now be correctly initialized in BitNode-8 (by Kline-)
" +
- "* Bug Fix: bladeburner.getCurrentAction() should now properly an 'Idle' object rather than null (by Kline-)
" +
- "* Bug Fix: Bladeburner skill cost multiplier should now properly increase in BitNode-12 (by hydroflame)
" +
- "* Bug Fix: 'document', 'hacknet', and 'window' keywords should no longer be counted multiple times in RAM calculations
" +
- "* Bug Fix: Joining factions through Singularity functions should now prevent you from joining opposing factions
" +
- "* Bug Fix: Four Sigma should no longer have two 'Speech Enhancement' Augmentations (by Kline-)
"
+ "v0.40.3
" +
+ ""
}
diff --git a/src/Fconf.js b/src/Fconf.js
index 77cddf622..be3729360 100644
--- a/src/Fconf.js
+++ b/src/Fconf.js
@@ -1,8 +1,9 @@
import {parse, Node} from "../utils/acorn";
var FconfSettings = {
- ENABLE_BASH_HOTKEYS: false,
- ENABLE_TIMESTAMPS: false,
+ ENABLE_BASH_HOTKEYS: false,
+ ENABLE_TIMESTAMPS: false,
+ WRAP_INPUT: false,
}
var FconfComments = {
@@ -15,6 +16,11 @@ var FconfComments = {
"http://bitburner.readthedocs.io/en/latest/shortcuts.html",
ENABLE_TIMESTAMPS: "Terminal commands and log entries will be timestamped. The timestamp\n" +
"will have the format: M/D h:m",
+ WRAP_INPUT: "Wrap Terminal Input. If this is enabled, then when a Terminal command is\n" +
+ "too long and overflows, then it will wrap to the next line instead of\n" +
+ "side-scrolling\n\n" +
+ "Note that after you enable/disable this, you'll have to run a command\n" +
+ "before its effect takes place.",
}
//Parse Fconf settings from the config text
@@ -74,6 +80,7 @@ function parseFconfSetting(setting, value) {
switch(setting) {
case "ENABLE_BASH_HOTKEYS":
case "ENABLE_TIMESTAMPS":
+ case "WRAP_INPUT":
var value = value.toLowerCase();
if (value === "1" || value === "true" || value === "y") {
value = true;
diff --git a/src/Terminal.js b/src/Terminal.js
index 821416ac2..aac09ecef 100644
--- a/src/Terminal.js
+++ b/src/Terminal.js
@@ -48,6 +48,7 @@ import {yesNoBoxCreate,
import {post, hackProgressBarPost,
hackProgressPost} from "./ui/postToTerminal";
+import autosize from 'autosize';
import * as JSZip from 'jszip';
import * as FileSaver from 'file-saver';
@@ -64,8 +65,8 @@ $(document).keydown(function(event) {
if (event.keyCode === KEY.ENTER) {
event.preventDefault(); //Prevent newline from being entered in Script Editor
- var command = $('input[class=terminal-input]').val();
- post(
+ var command = terminalInput.value;
+ post(
"[" +
(FconfSettings.ENABLE_TIMESTAMPS ? getTimestamp() + " " : "") +
Player.getCurrentServer().hostname +
@@ -520,9 +521,18 @@ let Terminal = {
commandHistoryIndex: 0,
resetTerminalInput: function() {
- document.getElementById("terminal-input-td").innerHTML =
- "