We can finally rest...
This commit is contained in:
parent
e5fe71ce46
commit
7846f80f11
2 changed files with 8 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
import { createRequire } from 'module';
|
import { createRequire } from 'module';
|
||||||
const require = createRequire(import.meta.url);
|
const require = createRequire(import.meta.url);
|
||||||
var readlineSync = require('readline-sync');
|
var readlineSync = require('readline-sync');
|
||||||
|
const { exec } = require("child_process");
|
||||||
|
|
||||||
import { food, foodRate, health, healthCap, locationA, locationB, name, radPoints, radSeverity, walkRate } from "./variables.js";
|
import { food, foodRate, health, healthCap, locationA, locationB, name, radPoints, radSeverity, walkRate } from "./variables.js";
|
||||||
|
|
||||||
|
|
@ -82,6 +82,11 @@ export function calcLocation() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function sleep(time) {
|
||||||
|
exec("sleep "+time);
|
||||||
|
}
|
||||||
|
|
||||||
function death() {
|
function death() {
|
||||||
let random = variables.randomNumber(1,3);
|
let random = variables.randomNumber(1,3);
|
||||||
if (random = 1) { deathScreen1(); }
|
if (random = 1) { deathScreen1(); }
|
||||||
|
|
@ -101,8 +106,6 @@ function death3() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function timeDeath() { // The death screen for passing the time limit
|
function timeDeath() { // The death screen for passing the time limit
|
||||||
console.clear;
|
console.clear;
|
||||||
console.log("Your PIP-Boy starts ringing...\n\n")
|
console.log("Your PIP-Boy starts ringing...\n\n")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Program is started from here, runs functions from other files.
|
// Program is started from here, runs functions from other files.
|
||||||
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose } from './functions.js';
|
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose, sleep } from './functions.js';
|
||||||
import { pois, poiCounter } from './poiscreens.js';
|
import { pois, poiCounter } from './poiscreens.js';
|
||||||
import { name, prewarmoney } from './variables.js';
|
import { name, prewarmoney } from './variables.js';
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ switch(mainMenuInput) {
|
||||||
console.log("Quitting Game...");
|
console.log("Quitting Game...");
|
||||||
break;
|
break;
|
||||||
case "4":
|
case "4":
|
||||||
console.log(pois[poiCounter]);
|
sleep(5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue