Fixed sleep function issue and writing to global variables.

This commit is contained in:
Raktbastr 2025-04-06 09:28:09 -05:00
parent dbd27cfa7d
commit fdd58af63e
4 changed files with 37 additions and 31 deletions

View file

@ -21,9 +21,9 @@ console.log("--------------------------");
console.log("1) Start new game");
console.log("2) Learn How to play");
console.log("3) Quit Game");
console.log("4) Dev stuff for testing");
console.log("4) Dev stuff for testing\n");
var mainMenuInput = userInput("Enter: ")
var mainMenuInput = userInput("Enter: ");
switch(mainMenuInput) {
case "1":
@ -35,6 +35,7 @@ switch(mainMenuInput) {
break;
case "3":
console.log("Quitting Game...");
await sleep(1);
break;
case "4":
for(var a = 0; a < 10; a++){
@ -50,14 +51,14 @@ switch(mainMenuInput) {
function startGame() { // So far what I have is filler and testing, feel free to change.
console.clear();
variableChange("name","=",userInput("What is your name? "));
name = userInput("What is your name? ");
console.log(name+" Is now your name...")
console.clear();
console.log("Intro:");
console.log("You are an ordinary loyal Enclave Soldier working at Raven Rock. \nYou are typing away at your terminal, entering reports of recovered materials when a message flashes on it");
console.log("|||||||")
console.log("|| Enclave Intranet Messager");
console.log("")
console.log("|||||||")
console.log("|| Message From: potus");
console.log("|||||||\n\n")
console.log("Dear "+name+",\n\n This is a direct order from the Enclave High Command. \nIgnore all previous directives. Proceed to Camp Navarro immediately. \nSeek safe passage through the Brotherhood and NCR territories. \nDo not disclose your mission to anyone but Enclave Personel with \nsecurity clearance 5 or higher. Reqisition supplies before departure. \nYou have been given 1 YEAR to complete this mission or face discharge.\n\n Signed, President John Henry Eden\n\n");