{
[key: string]: T;
diff --git a/src/Infiltration.js b/src/Infiltration.js
index 504c3407f..4c41ff3c4 100644
--- a/src/Infiltration.js
+++ b/src/Infiltration.js
@@ -468,6 +468,8 @@ function updateInfiltrationLevelText(inst) {
}
var expMultiplier = 2 * inst.clearanceLevel / inst.maxClearanceLevel;
+ // TODO: fix this to not rely on and whitespace for formatting...
+ /* eslint-disable no-irregular-whitespace */
document.getElementById("infiltration-level-text").innerHTML =
"Facility name: " + inst.companyName + "
" +
"Clearance Level: " + inst.clearanceLevel + "
" +
@@ -481,6 +483,7 @@ function updateInfiltrationLevelText(inst) {
"Dex exp gained: " + formatNumber(inst.dexExpGained * expMultiplier, 3) + "
" +
"Agi exp gained: " + formatNumber(inst.agiExpGained * expMultiplier, 3) + "
" +
"Cha exp gained: " + formatNumber(inst.chaExpGained * expMultiplier, 3);
+ /* eslint-enable no-irregular-whitespace */
}
function updateInfiltrationButtons(inst, scenario) {
diff --git a/src/Stock.ts b/src/Stock.ts
index 6d5928430..2ece32cf3 100644
--- a/src/Stock.ts
+++ b/src/Stock.ts
@@ -1,5 +1,8 @@
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
+/**
+ * Represents the valuation of a company in the World Stock Exchange.
+ */
export class Stock {
/**
* Initializes a Stock from a JSON save state
@@ -9,39 +12,9 @@ export class Stock {
}
/**
- * The stock's ticker symbol
+ * Bear or bull (more likely to go up or down, based on otlkMag)
*/
- readonly symbol: string;
-
- /**
- * Name of the company that the stock is for
- */
- readonly name: string;
-
- /**
- * Stock's share price
- */
- price: number;
-
- /**
- * Number of shares the player owns in the LONG position
- */
- playerShares: number;
-
- /**
- * Average price of stocks that the player owns in the LONG position
- */
- playerAvgPx: number;
-
- /**
- * Number of shares the player owns in the SHORT position
- */
- playerShortShares: number;
-
- /**
- * Average price of stocks that the player owns in the SHORT position
- */
- playerAvgShortPx: number;
+ b: boolean;
/**
* Maximum volatility
@@ -49,9 +22,9 @@ export class Stock {
readonly mv: number;
/**
- * Bear or bull (more likely to go up or down, based on otlkMag)
+ * Name of the company that the stock is for
*/
- b: boolean;
+ readonly name: string;
/**
* Outlook magnitude. Represents the stock's forecast and likelihood
@@ -59,16 +32,46 @@ export class Stock {
*/
otlkMag: number;
+ /**
+ * Average price of stocks that the player owns in the LONG position
+ */
+ playerAvgPx: number;
+
+ /**
+ * Average price of stocks that the player owns in the SHORT position
+ */
+ playerAvgShortPx: number;
+
+ /**
+ * Number of shares the player owns in the LONG position
+ */
+ playerShares: number;
+
+ /**
+ * Number of shares the player owns in the SHORT position
+ */
+ playerShortShares: number;
+
/**
* The HTML element that displays the stock's info in the UI
*/
posTxtEl: HTMLElement | null;
- constructor(name: string="",
- symbol: string="",
- mv: number=1,
- b: boolean=true,
- otlkMag: number=0,
+ /**
+ * Stock's share price
+ */
+ price: number;
+
+ /**
+ * The stock's ticker symbol
+ */
+ readonly symbol: string;
+
+ constructor(name: string = "",
+ symbol: string = "",
+ mv: number = 1,
+ b: boolean = true,
+ otlkMag: number = 0,
initPrice: number = 10e3) {
this.name = name;
this.symbol = symbol;
diff --git a/src/Terminal.js b/src/Terminal.js
index 893041258..fa2d87b23 100644
--- a/src/Terminal.js
+++ b/src/Terminal.js
@@ -1400,6 +1400,7 @@ let Terminal = {
post("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");
}
break;
+ /* eslint-disable no-case-declarations */
case "scp":
if (commandArray.length != 2) {
post("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");
@@ -1493,6 +1494,7 @@ let Terminal = {
}
post(`${scriptname} copied over to ${destServer.hostname}`);
break;
+ /* eslint-enable no-case-declarations */
case "sudov":
if (commandArray.length != 1) {
post("Incorrect number of arguments. Usage: sudov"); return;
@@ -1616,6 +1618,7 @@ let Terminal = {
}
}
break;
+ /* eslint-disable no-case-declarations */
case "wget":
if (commandArray.length !== 2) {
return post("Incorrect usage of wget command. Usage: wget [url] [target file]");
@@ -1648,6 +1651,7 @@ let Terminal = {
return post("wget failed: " + JSON.stringify(e));
})
break;
+ /* eslint-enable no-case-declarations */
default:
post("Command not found");
}
diff --git a/src/ui/postToTerminal.ts b/src/ui/postToTerminal.ts
index 519af1001..8fb3383bc 100644
--- a/src/ui/postToTerminal.ts
+++ b/src/ui/postToTerminal.ts
@@ -1,4 +1,4 @@
-import { getElementById } from "../../utils/uiHelpers/getElementById";
+import { getElementById } from "../../utils/uiHelpers/getElementById";
/**
* Adds some output to the terminal.