few fixes

This commit is contained in:
Olivier Gagnon 2021-09-21 17:36:42 -04:00
parent 501ce70702
commit 9a6b185141
8 changed files with 71 additions and 92 deletions

52
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -62,6 +62,7 @@ export function ResearchPopup(props: IProps): React.ReactElement {
Research(props.industry, allResearch[i]);
} catch (err) {
dialogBoxCreate(err + "");
return;
}
dialogBoxCreate(

@ -135,6 +135,7 @@ function evaluateVersionCompatibility(ver) {
}
function loadGame(saveString) {
if (!saveString) return false;
saveString = decodeURIComponent(escape(atob(saveString)));
const saveObj = JSON.parse(saveString, Reviver);

@ -4,43 +4,42 @@ import { IMap } from "../types";
export const TerminalHelpText: string[] = [
"Type 'help name' to learn more about the command ",
"",
'alias [-g] [name="value"] Create or display Terminal aliases',
"analyze Get information about the current machine ",
"backdoor Install a backdoor on the current machine ",
"buy [-l/program] Purchase a program through the Dark Web",
"cat [file] Display a .msg, .lit, or .txt file",
"cd [dir] Change to a new directory",
"check [script] [args...] Print a script's logs to Terminal",
"clear Clear all text on the terminal ",
"cls See 'clear' command ",
"connect [ip/hostname] Connects to a remote server",
"download [script/text file] Downloads scripts or text files to your computer",
"expr [math expression] Evaluate a mathematical expression",
"free Check the machine's memory (RAM) usage",
"hack Hack the current machine",
"help [command] Display this help text, or the help text for a command",
"home Connect to home computer",
"hostname Displays the hostname of the machine",
"ifconfig Displays the IP address of the machine",
"kill [script/pid] [args...] Stops the specified script on the current server ",
"killall Stops all running scripts on the current machine",
"ls [dir] [| grep pattern] Displays all files on the machine",
"lscpu Displays the number of CPU cores on the machine",
"mem [script] [-t] [n] Displays the amount of RAM required to run the script",
"mv [src] [dest] Move/rename a text or script file",
"nano [file] Text editor - Open up and edit a script or text file",
"ps Display all scripts that are currently running",
"rm [file] Delete a file from the server",
"run [name] [-t] [n] [args...] Execute a program or script",
"scan Prints all immediately-available network connections",
"scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away",
"scp [file] [server] Copies a file to a destination server",
"sudov Shows whether you have root access on this computer",
"tail [script] [args...] Displays dynamic logs for the specified script",
"theme [preset] | bg txt hlgt Change the color scheme of the UI",
"top Displays all running scripts and their RAM usage",
"unalias [alias name] Deletes the specified alias",
"wget [url] [target file] Retrieves code/text from a web server",
'alias [-g] [name="value"] Create or display Terminal aliases',
"analyze Get information about the current machine ",
"backdoor Install a backdoor on the current machine ",
"buy [-l/program] Purchase a program through the Dark Web",
"cat [file] Display a .msg, .lit, or .txt file",
"cd [dir] Change to a new directory",
"check [script] [args...] Print a script's logs to Terminal",
"clear Clear all text on the terminal ",
"cls See 'clear' command ",
"connect [ip/hostname] Connects to a remote server",
"download [script/text file] Downloads scripts or text files to your computer",
"expr [math expression] Evaluate a mathematical expression",
"free Check the machine's memory (RAM) usage",
"hack Hack the current machine",
"help [command] Display this help text, or the help text for a command",
"home Connect to home computer",
"hostname Displays the hostname of the machine",
"ifconfig Displays the IP address of the machine",
"kill [script/pid] [args...] Stops the specified script on the current server ",
"killall Stops all running scripts on the current machine",
"ls [dir] [| grep pattern] Displays all files on the machine",
"lscpu Displays the number of CPU cores on the machine",
"mem [script] [-t] [n] Displays the amount of RAM required to run the script",
"mv [src] [dest] Move/rename a text or script file",
"nano [file] Text editor - Open up and edit a script or text file",
"ps Display all scripts that are currently running",
"rm [file] Delete a file from the server",
"run [name] [-t n] [--tail] [args...] Execute a program or script",
"scan Prints all immediately-available network connections",
"scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away",
"scp [file] [server] Copies a file to a destination server",
"sudov Shows whether you have root access on this computer",
"tail [script] [args...] Displays dynamic logs for the specified script",
"top Displays all running scripts and their RAM usage",
"unalias [alias name] Deletes the specified alias",
"wget [url] [target file] Retrieves code/text from a web server",
];
export const HelpTexts: IMap<string[]> = {
@ -268,7 +267,7 @@ export const HelpTexts: IMap<string[]> = {
lscpu: ["lscpu", " ", "Prints the number of CPU Cores the current server has"],
mem: [
"mem [script name] [-t] [num threads]",
"mem [script name] [-t num_threads]",
" ",
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print ",
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then ",
@ -374,24 +373,6 @@ export const HelpTexts: IMap<string[]> = {
" ",
"tail foo.script 10 50000",
],
theme: [
"theme [preset] | [#background #text #highlight]",
" ",
"Change the color of the game's user interface",
" ",
"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. ",
"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values ",
"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and ",
"must be either 3 or 6 digits. Example:",
" ",
"theme #ffffff #385 #235012",
" ",
"A color picker such as ",
"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> ",
"can be used to get your desired hex color values",
" ",
"Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",
],
top: [
"top",
" ",

@ -344,14 +344,10 @@ export class Terminal implements ITerminal {
case CodingContractResult.Failure:
++contract.tries;
if (contract.tries >= contract.getMaxNumTries()) {
this.print("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing");
this.print("Contract FAILED - Contract is now self-destructing");
serv.removeContract(contract);
} else {
this.print(
`Contract <p style='color:red;display:inline'>FAILED</p> - ${
contract.getMaxNumTries() - contract.tries
} tries remaining`,
);
this.print(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);
}
break;
case CodingContractResult.Cancelled:

@ -535,7 +535,7 @@ export function InteractiveTutorialRoot(): React.ReactElement {
const content = contents[step];
if (content === undefined) throw new Error("error in the tutorial");
return (
<Paper square sx={{ maxWidth: "35vh", p: 2 }}>
<Paper square sx={{ maxWidth: "70vw", p: 2 }}>
{content.content}
{step !== iTutorialSteps.TutorialPageInfo && (
<>