Create-Task/files/poiscreens.js
2025-04-14 11:40:21 -05:00

238 lines
No EOL
6.5 KiB
JavaScript

// Holds poi code, seperate from encounters.js
import { userInput, pauseScreen } from "./functions.js";
import './variables.js';
export function checkPOI() {
if (path == 0) {
if (location >= (pois[poiCounter].location)-3 && location <= pois[poiCounter].location && pois[poiCounter].visited == false) {
switch(pois[poiCounter].name) {
case "Whitespring Bunker":
whitespring();
break;
case "BOS Bunker Gamma":
bosGamma();
break;
case "BOS Bunker Delta":
bosDelta();
break;
case "BOS Bunker Epsilon":
bosEpsilon();
break;
case "Vault 0":
vault0();
break;
case "Tibbets Prison":
tibbets();
break;
case "Flagstaff":
flagstaff();
break;
case "New Vegas":
newVegas();
}
}
}
if (path == 1) {
if (locationA >= (pois[poiCounter].location)-3 && locationA <= pois[poiCounter].location && pois[poiCounter].visited == false) {
switch(pois[poiCounter].name) {
case "Mojave Outpost":
mojaveOutpost();
break;
case "Necropolis":
necropolis();
break;
case "The Hub":
hub();
break;
case "Lost Hills":
lostHills();
break;
case "Mariposa MB":
mariposa();
break;
case "San Francisco":
sanFrancisco();
break;
case "Camp Navarro":
navarro();
break;
}
}
}
if (path == 2) {
if (locationB >= (pois[poiCounter].location)-3 && locationB <= pois[poiCounter].location && pois[poiCounter].visited == false) {
switch(pois[poiCounter].name) {
case "Canyon Wreckage":
canyonWreck();
break;
case "Hopeville & Ashton":
hopeville();
break;
case "The Sierra Madre":
sierraMadre();
break;
case "Shady Sands":
shadySands();
break;
case "New Reno":
newReno();
break;
case "Redding":
redding();
break;
case "Eureka":
eureka();
break;
case "Camp Navarro":
navarro();
}
}
}
}
global.poiCounter = 0;
global.pois = [
{name: "Whitespring Bunker", location: 25, path: 0, visited: false},
{name: "BOS Bunker Gamma", location: 100, path: 0, visited: false},
{name: "BOS Bunker Delta", location: 125, path: 0, visited: false},
{name: "BOS Bunker Epsilon", location: 175, path: 0, visited: false},
{name: "Vault 0", location: 200, path: 0, visited: false},
{name: "Tibbets Prison", location: 250, path: 0, visited: false},
{name: "Flagstaff", location: 275, path: 0, visited: false},
{name: "New Vegas", location: 300, path: 0, visited: false},
{name: "Mojave Outpost", location: 5, path: 1, visited: false},
{name: "Necropolis", location: 10, path: 1, visited: false},
{name: "The Hub", location: 15, path: 1, visited: false},
{name: "Lost Hills", location: 20, path: 1, visited: false},
{name: "Mariposa MB", location: 30, path: 1, visited: false},
{name: "San Franciso", location: 35, path: 1, visited: false},
{name: "Camp Navarro", location: 45, path: 1, visited: false},
{name: "Canyon Wreckage", location: 5, path: 2, visited: false},
{name: "Hopeville & Ashton", location: 15, path: 2, visited: false},
{name: "The Sierra Madre", location: 25, path: 2, visited: false},
{name: "Shady Sands", location: 35, path: 2, visited: false},
{name: "New Reno", location: 55, path: 2, visited: false},
{name: "Redding", location: 75, path: 2, visited: false},
{name: "Eureka", location: 85, path: 2, visited: false},
{name: "Camp Navarro", location: 100, path: 2, visited: false},
]
function whitespring() {
console.clear();
console.log("You have arrived at the Whitespring Bunker.");
console.log("What would you like to do?");
console.log("1) Explore");
console.log("2) Attempt to trade");
console.log("3) Open your PIP-Boy");
console.log("4) Leave");
let whitespringInput = userInput("Enter: ");
switch(whitespringInput) {
case "1":
console.clear();
console.log("A robotic voice greets you.");
console.log("MODUS Dialogue here...")
break;
case "2":
whitespringStore();
case "3":
pauseScreen();
case "4":
break;
}
}
function bosGamma() {
}
function bosDelta() {
}
function bosEpsilon() {
}
function vault0() {
}
function tibbets() {
}
function flagstaff() {
}
function newVegas() {
// The below is placeholder, once we add proper code delete this
console.clear();
console.log("Ahead lies 2 routes to Navarro.");
console.log("The northern route passes through the Divide before going north through the mountains.\nIt offers a longer path with fewer possible enimies, but those you face will not back down.")
console.log("The southern route goes through the heart of the NCR along I-15.\nIt is shorter and more pleasant, however without proper reputation your many stops may become worrisome.")
var pathChoice = userInput("Which path would you like to follow, Northern or Southern? ");
if (pathChoice.toLowerCase == "northern") {
path = 2;
}
if (pathChoice.toLowerCase == "southern") {
path = 1;
}
}
function mojaveOutpost() {
}
function necropolis() {
}
function hub() {
}
function lostHills() {
}
function mariposa() {
}
function sanFrancisco() {
}
function canyonWreck() {
}
function hopeville() {
}
function sierraMadre() {
}
function shadySands() {
}
function newReno() {
}
function redding() {
}
function eureka() {
}
function navarro() {
}