More achievements and fixed sleep.
This commit is contained in:
parent
9a765b8434
commit
324679c4a6
4 changed files with 45 additions and 12 deletions
19
files/functions.js
Normal file → Executable file
19
files/functions.js
Normal file → Executable file
|
|
@ -91,13 +91,22 @@ export function calcLocation() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var osPlat = os.platform();
|
||||||
export async function sleep(time) {
|
export async function sleep(time) {
|
||||||
try {
|
if (osPlat === 'win32') {
|
||||||
await execPromise(`sleep ${time}`);
|
try {
|
||||||
} catch (error) {
|
await execPromise(`powershell sleep ${time}`);
|
||||||
console.error("Error executing sleep command:", error);
|
} catch (error) {
|
||||||
|
console.error("Error executing sleep command:", error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
await execPromise(`sleep ${time}`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error executing sleep command:", error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function death() {
|
function death() {
|
||||||
let random = randomNumber(1,3);
|
let random = randomNumber(1,3);
|
||||||
|
|
|
||||||
7
files/main.js
Normal file → Executable file
7
files/main.js
Normal file → Executable file
|
|
@ -1,8 +1,7 @@
|
||||||
// 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, sleep, randomNumber } from './functions.js';
|
import { userInput, sleep, disableRawMode, } from './functions.js';
|
||||||
import { pois, poiCounter } from './poiscreens.js';
|
|
||||||
import { name, prewarmoney, variableChange } from './variables.js';
|
|
||||||
import { forcedEncounter, naturalEncounter } from './encounters.js';
|
import { forcedEncounter, naturalEncounter } from './encounters.js';
|
||||||
|
import { ravenRockStore } from './shops.js';
|
||||||
|
|
||||||
|
|
||||||
disableRawMode();
|
disableRawMode();
|
||||||
|
|
@ -15,7 +14,7 @@ console.log(" / / ) / / / ) / / / o / / ) / )
|
||||||
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___");
|
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___");
|
||||||
console.log("Credits: Bethesda Game Studio \n");
|
console.log("Credits: Bethesda Game Studio \n");
|
||||||
|
|
||||||
sleep(5);
|
await sleep(5);
|
||||||
|
|
||||||
console.log("What would you like to do?");
|
console.log("What would you like to do?");
|
||||||
console.log("--------------------------");
|
console.log("--------------------------");
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ export function ravenRockStore() {
|
||||||
rrInv[itemNum].amount -= itemAmt;
|
rrInv[itemNum].amount -= itemAmt;
|
||||||
console.log("You bought " + itemAmt + " " + rrInv[itemNum].name + "(s).");
|
console.log("You bought " + itemAmt + " " + rrInv[itemNum].name + "(s).");
|
||||||
console.log("You have " + preWarMoney + " pre-war money left.");
|
console.log("You have " + preWarMoney + " pre-war money left.");
|
||||||
|
inventory.push(rrInv[itemNum]);
|
||||||
console.log("Press enter to continue...");
|
console.log("Press enter to continue...");
|
||||||
userInput("[Enter]");
|
userInput("[Enter]");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,33 @@ global.equipmentList = [ // Equipment: weapons, armor, tools
|
||||||
|
|
||||||
// Special Armor
|
// Special Armor
|
||||||
{name: "Recon Under Armor", description: "A set of recon armor, for use in Power Armor", type: "uarmor", value: "5", unit: "dr",cost: 20, weight: 20},
|
{name: "Recon Under Armor", description: "A set of recon armor, for use in Power Armor", type: "uarmor", value: "5", unit: "dr",cost: 20, weight: 20},
|
||||||
|
|
||||||
{name: "Excavator Power Armor", description: "Excavator Power Armor, +25% Chance to find extra loot", type: "parmor", resistances: {balistic: 5, slash: 5, laser: 5, plasma: 5}, unit: "dt", cost: 5, weight: 5},
|
{name: "Excavator Power Armor", description: "Excavator Power Armor, +25% Chance to find extra loot", type: "parmor", resistances: {balistic: 5, slash: 5, laser: 5, plasma: 5}, unit: "dt", cost: 5, weight: 5},
|
||||||
|
|
||||||
|
// Even MORE Specialer Armor
|
||||||
{name: "Centurion Armor", description: "A set of Centurion armor, made for you", type: "armor", value: "5", unit: "dr",cost: 25, weight: 25},
|
{name: "Centurion Armor", description: "A set of Centurion armor, made for you", type: "armor", value: "5", unit: "dr",cost: 25, weight: 25},
|
||||||
{name: "NCR Ranger Armor" , description: "A set of NCR Ranger armor, standard issue", type: "armor", value: "5", unit: "dr",cost: 30, weight: 30},
|
{name: "NCR Ranger Armor" , description: "A set of NCR Ranger armor, standard issue", type: "armor", value: "5", unit: "dr",cost: 30, weight: 30},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
global.achievements = [
|
||||||
|
// POI/Faction Destroy
|
||||||
|
{name: "Dishonorable Discharge", description: "Deactivate MODUS at the Whitespring", unlocked: false},
|
||||||
|
{name: "Force of Habit", description: "Destroy the Midwest BoS", unlocked: false},
|
||||||
|
{name: "Profligate", description: "Destroy Flagstaff", unlocked: false},
|
||||||
|
{name: "Fold", description: "Kill Mr.House, possibly dooming New Vegas", unlocked: false},
|
||||||
|
{name: "Rockets Red Glare", description: "Activate the Hopeville nuk.", unlocked: false},
|
||||||
|
{name: "Revenge", description: "Destroy Shady Sands or all NCR cities (depending on path)", unlocked: false},
|
||||||
|
{name: "", description: "Destroy Eureka", unlocked: false},
|
||||||
|
{name: "Pit Stop", description: "Destroy Lost Hills", unlocked: false},
|
||||||
|
|
||||||
|
// Secrets
|
||||||
|
{name: "", description: "Find the Excavator Power Armor", unlocked: false},
|
||||||
|
{name: "Bots on Parade", description: "Reactivate the Calculator", unlocked: false},
|
||||||
|
{name: "7 Karat Run", description: "Find the Platnium Chip", unlocked: false},
|
||||||
|
{name: "What in the Goddamn!?", description: "Shoot and kill Benny in the Tops Casino", unlocked: false},
|
||||||
|
{name: "A chore, like any other", description: "Defeat the Malpais Legate, winning the Battle of Hoover Dam", unlocked: false},
|
||||||
|
{name: "Vault-Tec Loyalist", description: "Destory Shady Sands with the Hopeville nuke", unlocked: false},
|
||||||
|
|
||||||
|
// Faction Rep
|
||||||
|
|
||||||
|
//
|
||||||
|
]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue