diff --git a/README.md b/README.md index 9a4feee..793b885 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Lonesome Road ## Story -You are a loyal Enclave Soldier and the worst has just happened, Control Station Enclave is gone. You must make your way across the country to Raven Rock in the Capital Wasteland where President Eden is waiting for your imminent return. Be careful and remember "Dont feed the yao guai!" \ No newline at end of file +You are a loyal Enclave Soldier and the worst has just happened, Control Station Enclave is gone. You must make your way across the country to Raven Rock in the Capital Wasteland where President Eden is waiting for your imminent return. Be careful and remember "Dont feed the yao guai!" diff --git a/examples.js b/examples.js new file mode 100644 index 0000000..a344e9b --- /dev/null +++ b/examples.js @@ -0,0 +1,14 @@ +// Adding from other files + +// main.js +const variables = require("./variables.js"); +variables.sleep(1000); + +// variables.js +module.exports = { //add any functions or variables you want to export in here + sleep +} + +function sleep(time) { + setTimeout(() => {}, time); +} \ No newline at end of file diff --git a/files/main.js b/files/main.js index a0d4802..8a86dcc 100644 --- a/files/main.js +++ b/files/main.js @@ -1 +1,14 @@ -// Program is started from here, runs functions from other files. \ No newline at end of file +// Program is started from here, runs functions from other files. +const huntingGame = require("./huntinggame.js"); +const variables = require("./variables.js"); + + +console.clear(); +console.log("__________________________________________________________________________________________________________________________________"); +console.log("    _____                                          _                                                    ____                      "); +console.log("    /    '         /   /                           /                                                    /    )                   /"); +console.log("---/__-------__---/---/----__---------_/_---------/-------__----__----__---__----__---_--_----__-------/___ /----__----__----__-/-"); +console.log("  /        /   ) /   /   /   ) /   /  /   o      /      /   ) /   ) /___) (_ ` /   ) / /  ) /___)     /    |   /   ) /   ) /   /  "); +console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___"); +console.log("Credits: Bethesda Game Studio") +variables.sleep(1000); diff --git a/files/variables.js b/files/variables.js index eba3511..4e58476 100644 --- a/files/variables.js +++ b/files/variables.js @@ -1,5 +1,9 @@ // Holds the global variables, functions, and math operations such as the day counter and food eaten.. +module.exports = { + sleep +}; + var day = 0; // Should we add a definite end? 365 Days? var ammo = 0; // No cap :) @@ -57,4 +61,9 @@ function scavenge() { let random = Math.random(lootTables[group][0], lootTables[group][3]); inventory.push(random); } -} \ No newline at end of file +} + +function sleep(time) { + setTimeout(() => {}, time); +} +