diff --git a/src/Bladeburner/data/Help.ts b/src/Bladeburner/data/Help.ts index b22d01354..0c40de650 100644 --- a/src/Bladeburner/data/Help.ts +++ b/src/Bladeburner/data/Help.ts @@ -12,7 +12,7 @@ export const ConsoleHelpText: { } = { helpList: [ "Use 'help [command]' to get more information about a particular Bladeburner console command.", - "", + " ", " automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks", " clear/cls Clear the console", " help [cmd] Display this help text, or help text for a specific command", @@ -20,96 +20,103 @@ export const ConsoleHelpText: { " skill [action] [name] Level or display info about your Bladeburner skills", " start [type] [name] Start a Bladeburner action/task", " stop Stops your current Bladeburner action/task", + " ", ], automate: [ - "automate [var] [val] [hi/low]", - "", + "Usage: automate [var] [val] [hi/low]", + " ", "A simple way to automate your Bladeburner actions. This console command can be used " + "to automatically start an action when your stamina rises above a certain threshold, and " + "automatically switch to another action when your stamina drops below another threshold.", + " ", " automate status - Check the current status of your automation and get a brief description of what it'll do", " automate en - Enable the automation feature", " automate dis - Disable the automation feature", - "", + " ", "There are four properties that must be set for this automation to work properly. Here is how to set them:", - "", + " ", " automate stamina 100 high", " automate contract Tracking high", " automate stamina 50 low", " automate general 'Field Analysis' low", - "", + " ", "Using the four console commands above will set the automation to perform Tracking contracts " + "if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below " + "50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must " + "exactly match whatever the name is in the UI.", + " ", ], - clear: ["clear", "", "Clears the console"], - cls: ["cls", "", "Clears the console"], + clear: ["Usage: clear", " ", "Clears the console", " "], + cls: ["Usage: cls", " ", "Clears the console", " "], help: [ - "help [command]", - "", + "Usage: help [command]", + " ", "Running 'help' with no arguments displays the general help text, which lists all console commands " + "and a brief description of what they do. A command can be specified to get more specific help text " + "about that particular command. For example:", - "", + " ", " help automate", - "", + " ", "will display specific information about using the automate console command", + " ", ], log: [ - "log [en/dis] [type]", - "", + "Usage: log [en/dis] [type]", + " ", "Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged " + "in the console. There are also random events that are logged in the console as well. The five categories of " + "things that get logged are:", - "", + " ", "[general, contracts, ops, blackops, events]", - "", + " ", "The logging for these categories can be enabled or disabled like so:", - "", + " ", " log dis contracts - Disables logging that occurs when contracts are completed", " log en contracts - Enables logging that occurs when contracts are completed", " log dis events - Disables logging for Bladeburner random events", - "", + " ", "Logging can be universally enabled/disabled using the 'all' keyword:", - "", + " ", " log dis all", " log en all", + " ", ], skill: [ - "skill [action] [name]", - "", + "Usage: skill [action] [name]", + " ", "Level or display information about your skills.", - "", + " ", "To display information about all of your skills and your multipliers, use:", - "", + " ", " skill list", - "", + " ", "To display information about a specific skill, specify the name of the skill afterwards. " + "Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If " + "the name of the skill has whitespace, enclose the name of the skill in double quotation marks:", - "", + " ", " skill list Reaper", " skill list 'Digital Observer'", - "", + " ", "This console command can also be used to level up skills:", - "", + " ", " skill level [skill name]", + " ", ], start: [ - "start [type] [name]", - "", + "Usage: start [type] [name]", + " ", "Start an action. An action is specified by its type and its name. The " + "name is case-sensitive. It must appear exactly as it does in the UI. If " + "the name of the action has whitespace, enclose it in double quotation marks. " + "Valid action types include:", - "", + " ", "[general, contract, op, blackop]", - "", + " ", "Examples:", - "", + " ", " start contract Tracking", " start op 'Undercover Operation'", + " ", ], - stop: ["stop", "", "Stop your current action and go idle."], + stop: ["Usage: stop", " ", "Stop your current action and go idle.", " "], }; diff --git a/src/Bladeburner/ui/BladeburnerRoot.tsx b/src/Bladeburner/ui/BladeburnerRoot.tsx index 3274bbe1c..593874a62 100644 --- a/src/Bladeburner/ui/BladeburnerRoot.tsx +++ b/src/Bladeburner/ui/BladeburnerRoot.tsx @@ -4,7 +4,6 @@ import { Console } from "./Console"; import { AllPages } from "./AllPages"; import { use } from "../../ui/Context"; -import Grid from "@mui/material/Grid"; import Box from "@mui/material/Box"; export function BladeburnerRoot(): React.ReactElement { @@ -24,14 +23,10 @@ export function BladeburnerRoot(): React.ReactElement { if (bladeburner === null) return <>; return ( - - - - - - - - + + + + diff --git a/src/Bladeburner/ui/Console.tsx b/src/Bladeburner/ui/Console.tsx index d52cb0099..c64957714 100644 --- a/src/Bladeburner/ui/Console.tsx +++ b/src/Bladeburner/ui/Console.tsx @@ -23,7 +23,7 @@ const useStyles = makeStyles((theme: Theme) => width: "100%", }, input: { - backgroundColor: "#000", + backgroundColor: theme.colors.backgroundsecondary, }, nopadding: { padding: theme.spacing(0), @@ -56,6 +56,7 @@ export function Console(props: IProps): React.ReactElement { const classes = useStyles(); const [command, setCommand] = useState(""); const setRerender = useState(false)[1]; + const consoleInput = useRef(null); function handleCommandChange(event: React.ChangeEvent): void { setCommand(event.target.value); @@ -131,15 +132,21 @@ export function Console(props: IProps): React.ReactElement { } } + function handleClick(): void { + if (!consoleInput.current) return; + consoleInput.current.focus(); + } + return ( - + + }} + onClick={handleClick}> @@ -149,6 +156,7 @@ export function Console(props: IProps): React.ReactElement { autoFocus tabIndex={1} type="text" + inputRef={consoleInput} value={command} onChange={handleCommandChange} onKeyDown={handleKeyDown} @@ -171,7 +179,7 @@ interface ILogProps { entries: string[]; } -function Logs({entries}: ILogProps): React.ReactElement { +function Logs({ entries }: ILogProps): React.ReactElement { const scrollHook = useRef(null); // TODO: Text gets shifted up as new entries appear, if the user scrolled up it should attempt to keep the text focused @@ -182,7 +190,7 @@ function Logs({entries}: ILogProps): React.ReactElement { useEffect(() => { scrollToBottom(); - }, [entries]); + }, [entries.length]); return ( diff --git a/src/Bladeburner/ui/Stats.tsx b/src/Bladeburner/ui/Stats.tsx index 58d747afc..0400f8cb5 100644 --- a/src/Bladeburner/ui/Stats.tsx +++ b/src/Bladeburner/ui/Stats.tsx @@ -3,7 +3,6 @@ import { formatNumber, convertTimeMsToTimeElapsedString } from "../../utils/Stri import { BladeburnerConstants } from "../data/Constants"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { Money } from "../../ui/React/Money"; -import { StatsTable } from "../../ui/React/StatsTable"; import { numeralWrapper } from "../../ui/numeralFormat"; import { Factions } from "../../Faction/Factions"; import { IRouter } from "../../ui/Router"; @@ -44,138 +43,142 @@ export function Stats(props: IProps): React.ReactElement { } return ( - - - Your rank within the Bladeburner division.}> - Rank: {formatNumber(props.bladeburner.rank, 2)} - - -
- - - Performing actions will use up your stamina. -
-
- Your max stamina is determined primarily by your agility stat. -
-
- Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads - to a higher gain rate. -
-
- Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of - your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this - means your success rate would be multipled by 85% (100 - 15). -
-
- Your max stamina and stamina gain rate can also be increased by training, or through skills and - Augmentation upgrades. - - } - > - - Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)} - -
-
-
- - Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}% - -
- Team Size: {formatNumber(props.bladeburner.teamSize, 0)} - Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)} -
- Num Times Hospitalized: {props.bladeburner.numHosp} - - Money Lost From Hospitalizations: - -
- Current City: {props.bladeburner.city} - - - This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate - population count increases success rate estimates. - - } - > - - Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)} - - - -
- - - This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city. - - } - > - Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)} - - -
- - - The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a - chaos level can make contracts and operations harder. - - } - > - City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)} - - -
- {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && ( - <> - - - You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by - browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed. - - } - > + + + + + Rank 25 required. : ""}> + + + + + setTravelOpen(false)} bladeburner={props.bladeburner} /> + + + Your rank within the Bladeburner division.}> + Rank: {formatNumber(props.bladeburner.rank, 2)} + + +
+ + - Bonus time:{" "} - {convertTimeMsToTimeElapsedString( - (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000, - )} + Performing actions will use up your stamina. +
+
+ Your max stamina is determined primarily by your agility stat. +
+
+ Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads + to a higher gain rate. +
+
+ Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of + your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this + means your success rate would be multipled by 85% (100 - 15). +
+
+ Your max stamina and stamina gain rate can also be increased by training, or through skills and + Augmentation upgrades. -
-
+ } + > + + Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)} + +
+
+
+ + Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}% + +
+ Team Size: {formatNumber(props.bladeburner.teamSize, 0)} + Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)} +
+ Num Times Hospitalized: {props.bladeburner.numHosp} + + Money Lost From Hospitalizations: + +
+ Current City: {props.bladeburner.city} + + + This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate + population count increases success rate estimates. + + } + > + + Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)} + + + +
+ + + This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city. + + } + > + Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)} + + +
+ + + The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a + chaos level can make contracts and operations harder. + + } + > + City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)} + + +
+ {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && ( + <> + + + You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by + browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed. + + } + > + + Bonus time:{" "} + {convertTimeMsToTimeElapsedString( + (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000, + )} + + + +
+ + )} + Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)} +
+ + Aug. Success Chance mult: {formatNumber(props.player.bladeburner_success_chance_mult * 100, 1)}%
- - )} - Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)} -
- -
- - Rank 25 required.
: ""}> - - - - - setTravelOpen(false)} bladeburner={props.bladeburner} /> + Aug. Max Stamina mult: {formatNumber(props.player.bladeburner_max_stamina_mult * 100, 1)}% +
+ Aug. Stamina Gain mult: {formatNumber(props.player.bladeburner_stamina_gain_mult * 100, 1)}% +
+ Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}% + +
); } diff --git a/src/Terminal/HelpText.ts b/src/Terminal/HelpText.ts index af943d125..d77d413f3 100644 --- a/src/Terminal/HelpText.ts +++ b/src/Terminal/HelpText.ts @@ -3,73 +3,74 @@ 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 [hostname] Connects to a remote server", - "cp [src] [dst] Copy a file", - "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", - "grow Spoof money in a servers bank account, increasing the amount available.", - "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", - "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 one or more scripts or text files", - "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 d 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", - "vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode", - "weaken Reduce the security of the current machine", - "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/-a/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 [hostname] Connects to a remote server", + " cp [src] [dst] Copy a file", + " 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", + " grow Spoof money in a servers bank account, increasing the amount available.", + " 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", + " 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 one or more scripts or text files", + " 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 d 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", + " vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode", + " weaken Reduce the security of the current machine", + " wget [url] [target file] Retrieves code/text from a web server", + " ", ]; export const HelpTexts: IMap = { alias: [ - 'alias [-g] [name="value"] ', + 'Usage: alias [-g] [name="value"] ', " ", "Create or display aliases. An alias enables a replacement of a word with another string. ", "It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME ", "of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, ", "you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: ", " ", - 'alias nuke="run NUKE.exe"', + ' alias nuke="run NUKE.exe"', " ", "Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. ", "It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For ", "example, if the following alias was set: ", " ", - 'alias worm="HTTPWorm.exe"', + ' alias worm="HTTPWorm.exe"', " ", "and then you tried to run the following terminal command: ", " ", - "run worm", + " run worm", " ", "This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted ", "anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: ", " ", - 'alias -g worm="HTTPWorm.exe"', + ' alias -g worm="HTTPWorm.exe"', " ", "Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. ", " ", @@ -80,15 +81,16 @@ export const HelpTexts: IMap = { " ", ], analyze: [ - "analyze", + "Usage: analyze", " ", "Prints details and statistics about the current server. The information that is printed includes basic ", "server details such as the hostname, whether the player has root access, what ports are opened/closed, and also ", "hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is ", "available on the server, etc.", + " ", ], backdoor: [ - "backdoor", + "Usage: backdoor", " ", "Install a backdoor on the current machine, grants a secret bonus depending on the machine.", " ", @@ -96,7 +98,7 @@ export const HelpTexts: IMap = { " ", ], buy: [ - "buy [-l / -a / program]", + "Usage: buy [-l / -a / program]", " ", "Purchase a program through the Dark Web. Requires a TOR router to use.", " ", @@ -106,65 +108,72 @@ export const HelpTexts: IMap = { "If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.", " ", "Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.", + " ", ], cat: [ - "cat [file]", + "Usage: cat [file]", " ", "Display message (.msg), literature (.lit), or text (.txt) files. Examples:", " ", - "cat j1.msg", + " cat j1.msg", " ", - "cat foo.lit", + " cat foo.lit", + " ", + " cat servers.txt", " ", - "cat servers.txt", ], cd: [ - "cd [dir]", + "Usage: cd [dir]", " ", "Change to the specified directory. Note that this works even for directories that don't exist. If you ", "change to a directory that does not exist, it will not be 'created'. Examples:", " ", - "cd scripts/hacking", + " cd scripts/hacking", " ", - "cd /logs", + " cd /logs", + " ", + " cd ../", " ", - "cd ../", ], check: [ - "check [script name] [args...]", + "Usage: check [script name] [args...]", " ", "Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by ", "a space. Remember that a running script is uniquely ", "identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: ", " ", - "run foo.script 1 2 foodnstuff", + " run foo.script 1 2 foodnstuff", " ", "Then to run the 'check' command on this script you would have to pass the same arguments in: ", " ", - "check foo.script 1 2 foodnstuff", + " check foo.script 1 2 foodnstuff", + " ", ], clear: [ - "clear", + "Usage: clear", " ", "Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command", + " ", ], cls: [ - "cls", + "Usage: cls", " ", "Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command", + " ", ], connect: [ - "connect [hostname]", + "Usage: connect [hostname]", " ", "Connect to a remote server. The hostname or IP address of the remote server must be given as the argument ", "to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To ", "see which servers can be connected to, use the 'scan' command.", + " ", ], - cp: ["cp [src] [dst]", " ", "Copy a file on this server. To copy a file to another server use scp."], + cp: ["Usage: cp [src] [dst]", " ", "Copy a file on this server. To copy a file to another server use scp.", " "], download: [ - "download [script/text file]", + "Usage: download [script/text file]", " ", "Downloads a script or text file to your computer (like your real life computer).", " ", @@ -178,7 +187,7 @@ export const HelpTexts: IMap = { " ", ], expr: [ - "expr [mathematical expression]", + "Usage: expr [mathematical expression]", " ", "Evaluate a simple mathematical expression. Supports native JavaScript operators:", " ", @@ -186,47 +195,49 @@ export const HelpTexts: IMap = { " ", "Example:", " ", - "expr 25 * 2 ** 10", + " expr 25 * 2 ** 10", " ", "Note that letters (non-digits) are not allowed and will be removed from the input.", + " ", ], free: [ - "free", + "Usage: free", " ", "Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as ", "how much of it is being used.", + " ", ], grow: [ - "grow", - "", + "Usage: grow", + " ", "Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.", "See the wiki page for hacking mechanics.", + " ", ], hack: [ - "hack", + "Usage: hack", " ", "Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics", " ", ], help: [ - "help [command]", + "Usage: help [command]", " ", "Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief ", "description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print ", "more detailed information about the Terminal command. Examples: ", " ", - "help alias", + " help alias", + " ", + " help scan-analyze", " ", - "help scan-analyze", ], home: [ - "home" + "Connect to your home computer. This will work no matter what server you are currently connected to.", + "Usage: home", " ", "Connect to your home computer. This will work no matter what server you are currently connected to.", " ", ], - hostname: ["hostname", " ", "Prints the hostname of the current server"], + hostname: ["Usage: hostname", " ", "Prints the hostname of the current server", " "], kill: [ - "kill [script name] [args...]", - " ", - "kill [pid]", + "Usage: kill [script name] [args...] or kill [pid", " ", "Kill the script specified by the script name and arguments OR by its PID.", " ", @@ -235,24 +246,26 @@ export const HelpTexts: IMap = { "uniquely identified by both its name and the arguments that are used to start ", "it. So, if a script was ran with the following arguments:", " ", - "run foo.script 1 sigma-cosmetics", + " run foo.script 1 sigma-cosmetics", " ", "Then to kill this script the same arguments would have to be used:", " ", - "kill foo.script 1 sigma-cosmetics", + " kill foo.script 1 sigma-cosmetics", " ", "If you are killing the script using its PID, then the PID argument must be numeric", + " ", ], killall: [ - "killall", + "Usage: killall", " ", "Kills all scripts on the current server. ", "Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. ", "This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. ", "The script will not be stopped/killed until after that time has elapsed.", + " ", ], ls: [ - "ls [dir] [| grep pattern]", + "Usage: ls [dir] [| grep pattern]", " ", "The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. ", "The files will be displayed in alphabetical order. ", @@ -265,34 +278,36 @@ export const HelpTexts: IMap = { " ", "List all files with the '.script' extension in the current directory:", " ", - "ls | grep .script", + " ls | grep .script", " ", "List all files with the '.js' extension in the root directory:", " ", - "ls / | grep .js", + " ls / | grep .js", " ", "List all files with the word 'purchase' in the filename, in the 'scripts' directory:", " ", - "ls scripts | grep purchase", + " ls scripts | grep purchase", + " ", ], - lscpu: ["lscpu", " ", "Prints the number of CPU Cores the current server has"], + lscpu: ["Usage: lscpu", " ", "Prints the number of CPU Cores the current server has", " "], mem: [ - "mem [script name] [-t num_threads]", + "Usage: 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 ", "an argument for the number of threads must be passed in afterwards. Examples:", " ", - "mem foo.script", + " mem foo.script", " ", - "mem foo.script -t 50", + " mem foo.script -t 50", " ", "The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example ", "above will print the amount of RAM needed to run 'foo.script' with 50 threads.", + " ", ], mv: [ - "mv [src] [dest]", + "Usage: mv [src] [dest]", " ", "Move the source file to the specified destination. This can also be used to rename files. ", "This command only works for scripts and text files (.txt). This command CANNOT be used to ", @@ -302,28 +317,31 @@ export const HelpTexts: IMap = { "full filepath. ", "Examples: ", " ", - "mv hacking-controller.script scripts/hacking-controller.script", + " mv hacking-controller.script scripts/hacking-controller.script", + " ", + " mv myScript.js myOldScript.js", " ", - "mv myScript.js myOldScript.js", ], nano: [ - "nano [file ...]", + "Usage: nano [file ...]", " ", "Opens up the specified file(s) in the Text Editor. Only scripts (.script) or text files (.txt) can be ", "edited using the Text Editor. If the file does not already exist, then a new, empty one ", "will be created", + " ", ], - ps: ["ps", " ", "Prints all scripts that are running on the current server"], + ps: ["Usage: ps", " ", "Prints all scripts that are running on the current server", " "], rm: [ - "rm [file]", + "Usage: rm [file]", " ", "Removes the specified file from the current server. A file can be a script, a program, or a message file. ", " ", "WARNING: This is permanent and cannot be undone", + " ", ], run: [ - "run [file name] [-t] [num threads] [args...]", + "Usage: run [file name] [-t] [num threads] [args...]", " ", "Execute a program, script or coding contract.", " ", @@ -338,13 +356,14 @@ export const HelpTexts: IMap = { " ", ], scan: [ - "scan", + "Usage: scan", " ", "Prints all immediately-available network connection. This will print a list of all servers that you can currently connect ", "to using the 'connect' Terminal command.", + " ", ], "scan-analyze": [ - "scan-analyze [depth] [-a]", + "Usage: scan-analyze [depth] [-a]", " ", "Prints detailed information about all servers up to [depth] nodes away on the network. Calling ", "'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal ", @@ -360,71 +379,77 @@ export const HelpTexts: IMap = { " ", "By default, this command will not display servers that you have purchased. However, you can pass in the ", "-a flag at the end of the command if you would like to enable that.", + " ", ], scp: [ - "scp [filename ...] [target server]", + "Usage: scp [filename ...] [target server]", " ", "Copies the specified file(s) from the current server to the target server. ", "This command only works for script files (.script or .js extension), literature files (.lit extension), ", "and text files (.txt extension). ", "The second argument passed in must be the hostname or IP of the target server. Examples:", " ", - "scp foo.script n00dles", + " scp foo.script n00dles", " ", - "scp foo.script bar.script n00dles", + " scp foo.script bar.script n00dles", " ", ], - sudov: ["sudov", " ", "Prints whether or not you have root access to the current machine"], + sudov: ["Usage: sudov", " ", "Prints whether or not you have root access to the current machine", " "], tail: [ - "tail [script name] [args...]", + "Usage: tail [script name] [args...]", " ", "Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated ", "by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used ", "to run it. So, if a script was ran with the following arguments: ", " ", - "run foo.script 10 50000", + " run foo.script 10 50000", " ", "Then in order to check its logs with 'tail' the same arguments must be used: ", " ", - "tail foo.script 10 50000", + " tail foo.script 10 50000", + " ", ], top: [ - "top", + "Usage: top", " ", "Prints a list of all scripts running on the current server as well as their thread count and how much ", "RAM they are using in total.", + " ", ], unalias: [ - "unalias [alias name]", + "Usage: unalias [alias name]", " ", "Deletes the specified alias. Note that the double quotation marks are required. ", " ", "As an example, if an alias was declared using:", " ", - 'alias r="run"', + ' alias r="run"', " ", "Then it could be removed using:", " ", - "unalias r", + " unalias r", " ", "It is not necessary to differentiate between global and non-global aliases when using 'unalias'", + " ", ], vim: [ - "vim [file ...]", + "Usage: vim [file ...]", " ", "Opens up the specified file(s) in the Text Editor in vim mode. Only scripts (.script) or text files (.txt) can be ", "edited using the Text Editor. If the file does not already exist, then a new, empty one ", "will be created", + " ", ], weaken: [ - "weaken", - "", + "Usage: weaken", + " ", "Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.", "Requires root access. See the wiki page for hacking mechanics.", + " ", ], wget: [ - "wget [url] [target file]", + "Usage: wget [url] [target file]", " ", "Retrieves data from a URL and downloads it to a file on the current server. The data can only ", "be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, ", @@ -433,6 +458,7 @@ export const HelpTexts: IMap = { "Note that it will not be possible to download data from many websites because they do not allow ", "cross-origin resource sharing (CORS). Example:", " ", - "wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt", + " wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt", + " ", ], };