Finished Achievements. Needs implimentation.

This commit is contained in:
Raktbastr 2025-04-23 23:30:29 -05:00
parent 324679c4a6
commit 22975aff26
6 changed files with 762 additions and 116 deletions

View file

@ -65,7 +65,7 @@ export function ravenRockStore() {
}
}
function vaultZeroStore() {
export function vaultZeroStore() {
while (true) {
console.clear();
console.log("Brotherhood of Steel Requisition System - Vault 0");
@ -109,7 +109,7 @@ function vaultZeroStore() {
}
}
function newVegasStore() {
export function newVegasStore() {
while (true) {
console.clear();
console.log("Welcome to New Vegas. Selection pulls from Gunrunners, Mick & Ralph's, and Followers of the Apocalypse.");
@ -154,7 +154,7 @@ function newVegasStore() {
}
}
function eurekaStore() {
export function eurekaStore() {
while (true) {
console.clear();
console.log("Welcome to Eureka. Selection pulls from local traders and willing Enclave Veterans.");
@ -198,7 +198,7 @@ function eurekaStore() {
}
}
function trader() { // Picks a selection of items from a global trader inventory, used for misc area shops
export function trader() { // Picks a selection of items from a global trader inventory, used for misc area shops
var tempTraderInv = [];
for (var a = 0; a <= 2; a++) {
let randomPick = randomNumber()
@ -249,4 +249,100 @@ function trader() { // Picks a selection of items from a global trader inventory
console.log("Invalid input, try again.");
}
}
}
export function genericBOSStore(poiName) { // Picks a selection of items from a global trader inventory, used for misc area shops
var tempTraderInv = [];
for (var a = 0; a <= 2; a++) {
let randomPick = randomNumber()
tempTraderInv.push(traderInv[1]);
console.log(randomPick);
}
console.log(tempTraderInv);
while (true) {
console.clear();
console.log("Brotherhood of Steel Requisition System - "+poiName);
console.log("Name | Price (Caps) | Amount in stock");
console.log("-----------------------------------------------------");
for (var i = 0; i < Inv.length; i++) {
console.log(i+"). " + rrInv[i].item + " | " + rrInv[i].price + " | " + rrInv[i].amount);
}
console.log("-----------------------------------------------------");
console.log("You have " + preWarMoney + " pre-war money.");
console.log("What would you like to do?");
console.log("1) Buy supplies");
console.log("2) Leave shop");
var rrInput = userInput("Enter: ");
switch(rrInput) {
case "1":
console.log("What would you like to buy?");
let itemNum = userInput("Enter item number: ");
let itemAmt = userInput("Enter amount: ");
if (itemAmt > rrInv[itemNum].amount) {
console.log("Not enough stock.");
break;
} else if (itemAmt * rrInv[itemNum].price > preWarMoney) {
console.log("Not enough money.");
break;
} else {
preWarMoney -= itemAmt * rrInv[itemNum].price;
rrInv[itemNum].amount -= itemAmt;
console.log("You bought " + itemAmt + " " + rrInv[itemNum].item + "(s).");
console.log("You have " + preWarMoney + " pre-war money left.");
console.log("Press enter to continue...");
userInput("[Enter]");
}
break;
case "2":
console.log("Leaving shop...");
return true;
default:
console.log("Invalid input, try again.");
}
}
}
export function whitespringStore() {
while (true) {
console.clear();
console.log("Welcome to the Whitespring Mall. Selection pulls from all vendors.")
console.log("Name | Price (Caps) | Amount in stock");
console.log("-----------------------------------------------------");
for (var i = 0; i < vt0InvInv.length; i++) {
console.log(i+"). " + vt0InvInv[i].item + " | " + vtInv[i].price + " | " + vtInv[i].amount);
}
console.log("-----------------------------------------------------");
console.log("You have " + caps + " caps.");
console.log("What would you like to do?");
console.log("1) Buy supplies");
console.log("2) Leave shop");
var vt0Input = userInput("Enter: ");
switch(vt0Input) {
case "1":
console.log("What would you like to buy?");
let itemNum = userInput("Enter item number: ");
let itemAmt = userInput("Enter amount: ");
if (itemAmt > vt0Inv[itemNum].amount) {
console.log("Not enough stock.");
break;
} else if (itemAmt * vt0Inv[itemNum].price > caps) {
console.log("Not enough money.");
break;
} else {
caps -= itemAmt * vt0Inv[itemNum].price;
rrInv[itemNum].amount -= itemAmt;
console.log("You bought " + itemAmt + " " + vt0Inv[itemNum].item + "(s).");
console.log("You have " + caps + " caps left.");
console.log("Press enter to continue...");
userInput("[Enter]");
}
break;
case "2":
console.log("Leaving shop...");
return true;
default:
console.log("Invalid input, try again.");
}
}
}