More achievements and fixed sleep.

This commit is contained in:
Raktbastr 2025-04-21 19:23:23 -05:00
parent 9a765b8434
commit 324679c4a6
4 changed files with 45 additions and 12 deletions

9
files/functions.js Normal file → Executable file
View file

@ -91,12 +91,21 @@ export function calcLocation() {
}
}
var osPlat = os.platform();
export async function sleep(time) {
if (osPlat === 'win32') {
try {
await execPromise(`powershell sleep ${time}`);
} 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() {

7
files/main.js Normal file → Executable file
View file

@ -1,8 +1,7 @@
// Program is started from here, runs functions from other files.
import { userInput, calcLocation, radPointsCalc, healthCapCalc, checkLose, sleep, randomNumber } from './functions.js';
import { pois, poiCounter } from './poiscreens.js';
import { name, prewarmoney, variableChange } from './variables.js';
import { userInput, sleep, disableRawMode, } from './functions.js';
import { forcedEncounter, naturalEncounter } from './encounters.js';
import { ravenRockStore } from './shops.js';
disableRawMode();
@ -15,7 +14,7 @@ console.log(" / / ) / / / ) / / / o / / ) / )
console.log("_/________(___(_/___/___(___/_(___(__(_ __o_____/____/_(___/_/___/_(___ _(__)_(___/_/_/__/_(___ _____/_____|__(___/_(___(_(___/___");
console.log("Credits: Bethesda Game Studio \n");
sleep(5);
await sleep(5);
console.log("What would you like to do?");
console.log("--------------------------");

View file

@ -50,6 +50,7 @@ export function ravenRockStore() {
rrInv[itemNum].amount -= itemAmt;
console.log("You bought " + itemAmt + " " + rrInv[itemNum].name + "(s).");
console.log("You have " + preWarMoney + " pre-war money left.");
inventory.push(rrInv[itemNum]);
console.log("Press enter to continue...");
userInput("[Enter]");
}

View file

@ -79,9 +79,33 @@ global.equipmentList = [ // Equipment: weapons, armor, tools
// 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: "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: "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
//
]