Merge pull request #109 from danielyxie/dev

Dev
This commit is contained in:
danielyxie 2017-08-15 19:18:47 -05:00 committed by GitHub
commit 7b19db58ca
4 changed files with 11 additions and 3 deletions

@ -16,7 +16,7 @@ TerminalHelpText =
"ifconfig Displays the IP address of the machine<br>" + "ifconfig Displays the IP address of the machine<br>" +
"kill [script] [args...] Stops the specified script on the current server <br>" + "kill [script] [args...] Stops the specified script on the current server <br>" +
"killall Stops all running scripts on the current machine<br>" + "killall Stops all running scripts on the current machine<br>" +
"ls Displays all programs and scripts on the machine<br>" + "ls [| grep pattern] Displays all files on the machine<br>" +
"mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>" + "mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>" +
"nano [script] Script editor - Open up and edit a script<br>" + "nano [script] Script editor - Open up and edit a script<br>" +
"ps Display all scripts that are currently running<br>" + "ps Display all scripts that are currently running<br>" +

@ -257,7 +257,7 @@ function iTutorialEvaluateStep() {
//next step triggered by terminal commmand //next step triggered by terminal commmand
break; break;
case iTutorialSteps.TerminalRunScript: case iTutorialSteps.TerminalRunScript:
iTutorialSetText("We have 4GB of free RAM on this machine, which is enough to run our " + iTutorialSetText("We have 8GB of free RAM on this machine, which is enough to run our " +
"script. Let's run our script using 'run foodnstuff.script'."); "script. Let's run our script using 'run foodnstuff.script'.");
//next step triggered by terminal commmand //next step triggered by terminal commmand
break; break;
@ -641,6 +641,9 @@ function iTutorialEnd() {
currITutorialStep = iTutorialSteps.End; currITutorialStep = iTutorialSteps.End;
iTutorialIsRunning = false; iTutorialIsRunning = false;
document.getElementById("interactive-tutorial-container").style.display = "none"; document.getElementById("interactive-tutorial-container").style.display = "none";
dialogBoxCreate("If you are new to the game, the following links may be useful for you!<br><br>" +
"<a class='a-link-button' href='http://bitburner.wikia.com/wiki/Chapt3rs_Guide_to_Getting_Started_with_Bitburner' target='_blank'>Getting Started Guide</a>" +
"<a class='a-link-button' href='http://bitburner.wikia.com/wiki/Bitburner_Wiki' target='_blank'>Wiki</a>");
} }
function iTutorialSetText(txt) { function iTutorialSetText(txt) {

@ -270,7 +270,11 @@ function evalBinary(exp, workerScript){
resolve(expLeft*expRight); resolve(expLeft*expRight);
break; break;
case "/": case "/":
resolve(expLeft/expRight); if (expRight === 0) {
reject(makeRuntimeRejectMsg(workerScript, "ERROR: Divide by zero"));
} else {
resolve(expLeft/expRight);
}
break; break;
case "%": case "%":
resolve(expLeft%expRight); resolve(expLeft%expRight);

@ -679,6 +679,7 @@ var Engine = {
//Displays the text when a section of the Tutorial is opened //Displays the text when a section of the Tutorial is opened
displayTutorialPage: function(text) { displayTutorialPage: function(text) {
document.getElementById("tutorial-getting-started-link").style.display = "none";
Engine.Clickables.tutorialNetworkingButton.style.display = "none"; Engine.Clickables.tutorialNetworkingButton.style.display = "none";
Engine.Clickables.tutorialHackingButton.style.display = "none"; Engine.Clickables.tutorialHackingButton.style.display = "none";
Engine.Clickables.tutorialScriptsButton.style.display = "none"; Engine.Clickables.tutorialScriptsButton.style.display = "none";