2018-06-26 18:34:11 +02:00
import { Bladeburner } from "./Bladeburner" ;
2017-08-30 19:44:29 +02:00
import { CompanyPositions , initCompanies ,
2018-06-26 18:34:11 +02:00
Companies , getJobRequirementText } from "./Company" ;
import { Corporation } from "./CompanyManagement" ;
import { CONSTANTS } from "./Constants" ;
import { Crimes } from "./Crimes" ;
import { Engine } from "./engine" ;
import { beginInfiltration } from "./Infiltration" ;
import { hasBladeburnerSF } from "./NetscriptFunctions" ;
import { Player } from "./Player" ;
import { Server , AllServers , AddToAllServers } from "./Server" ;
2017-08-30 19:44:29 +02:00
import { purchaseServer ,
2018-06-26 18:34:11 +02:00
purchaseRamForHomeComputer } from "./ServerPurchases" ;
import { Settings } from "./Settings" ;
import { SpecialServerNames , SpecialServerIps } from "./SpecialServerIps" ;
2017-08-30 19:44:29 +02:00
2018-06-26 18:34:11 +02:00
import { dialogBoxCreate } from "../utils/DialogBox" ;
2018-07-08 05:19:19 +02:00
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners" ;
2018-06-26 18:34:11 +02:00
import { createRandomIp } from "../utils/IPAddress" ;
2018-05-31 04:46:52 +02:00
import numeral from "numeral/min/numeral.min" ;
2018-06-22 23:30:24 +02:00
import { formatNumber } from "../utils/StringHelperFunctions" ;
2017-08-30 19:44:29 +02:00
import { yesNoBoxCreate , yesNoTxtInpBoxCreate ,
yesNoBoxGetYesButton , yesNoBoxGetNoButton ,
yesNoTxtInpBoxGetYesButton , yesNoTxtInpBoxGetNoButton ,
yesNoTxtInpBoxGetInput , yesNoBoxClose ,
2018-06-26 18:34:11 +02:00
yesNoTxtInpBoxClose } from "../utils/YesNoBox" ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
/* Display Location Content when visiting somewhere in the World*/
2018-03-27 02:46:21 +02:00
var Locations = {
2017-01-31 06:19:32 +01:00
//Cities
Aevum : "Aevum" ,
2017-05-06 21:12:45 +02:00
//AevumDesc: ""
2017-01-31 06:19:32 +01:00
Chongqing : "Chongqing" ,
Sector12 : "Sector-12" ,
NewTokyo : "New Tokyo" ,
Ishima : "Ishima" ,
Volhaven : "Volhaven" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//Aevum Locations
AevumTravelAgency : "Aevum Travel Agency" ,
2017-04-24 21:10:35 +02:00
AevumSummitUniversity : "Summit University" ,
2017-01-31 06:19:32 +01:00
AevumECorp : "ECorp" ,
AevumBachmanAndAssociates : "Bachman & Associates" ,
AevumClarkeIncorporated : "Clarke Incorporated" ,
2018-05-07 19:25:44 +02:00
AevumFulcrumTechnologies : "Fulcrum Technologies" ,
2017-01-31 06:19:32 +01:00
AevumAeroCorp : "AeroCorp" ,
AevumGalacticCybersystems : "Galactic Cybersystems" ,
AevumWatchdogSecurity : "Watchdog Security" ,
AevumRhoConstruction : "Rho Construction" ,
2017-07-28 16:19:28 +02:00
AevumPolice : "Aevum Police Headquarters" ,
2017-01-31 06:19:32 +01:00
AevumNetLinkTechnologies : "NetLink Technologies" ,
AevumCrushFitnessGym : "Crush Fitness Gym" ,
AevumSnapFitnessGym : "Snap Fitness Gym" ,
2017-05-03 19:52:54 +02:00
AevumSlums : "Aevum Slums" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//Chongqing locations
2017-07-28 16:19:28 +02:00
ChongqingTravelAgency : "Chongqing Travel Agency" ,
2017-01-31 06:19:32 +01:00
ChongqingKuaiGongInternational : "KuaiGong International" ,
ChongqingSolarisSpaceSystems : "Solaris Space Systems" ,
2017-05-03 19:52:54 +02:00
ChongqingSlums : "Chongqing Slums" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//Sector 12
Sector12TravelAgency : "Sector-12 Travel Agency" ,
2017-04-24 21:10:35 +02:00
Sector12RothmanUniversity : "Rothman University" ,
2017-01-31 06:19:32 +01:00
Sector12MegaCorp : "MegaCorp" ,
Sector12BladeIndustries : "Blade Industries" ,
Sector12FourSigma : "Four Sigma" ,
Sector12IcarusMicrosystems : "Icarus Microsystems" ,
Sector12UniversalEnergy : "Universal Energy" ,
Sector12DeltaOne : "DeltaOne" ,
Sector12CIA : "Central Intelligence Agency" ,
Sector12NSA : "National Security Agency" ,
Sector12AlphaEnterprises : "Alpha Enterprises" ,
Sector12CarmichaelSecurity : "Carmichael Security" ,
Sector12FoodNStuff : "FoodNStuff" ,
Sector12JoesGuns : "Joe's Guns" ,
Sector12IronGym : "Iron Gym" ,
Sector12PowerhouseGym : "Powerhouse Gym" ,
2017-05-04 09:05:43 +02:00
Sector12Slums : "Sector-12 Slums" ,
2017-12-02 04:50:08 +01:00
Sector12CityHall : "Sector-12 City Hall" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//New Tokyo
NewTokyoTravelAgency : "New Tokyo Travel Agency" ,
NewTokyoDefComm : "DefComm" ,
NewTokyoVitaLife : "VitaLife" ,
NewTokyoGlobalPharmaceuticals : "Global Pharmaceuticals" ,
NewTokyoNoodleBar : "Noodle Bar" ,
2017-05-04 07:05:48 +02:00
NewTokyoSlums : "New Tokyo Slums" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//Ishima
IshimaTravelAgency : "Ishima Travel Agency" ,
IshimaStormTechnologies : "Storm Technologies" ,
IshimaNovaMedical : "Nova Medical" ,
IshimaOmegaSoftware : "Omega Software" ,
2017-05-03 19:52:54 +02:00
IshimaSlums : "Ishima Slums" ,
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
//Volhaven
2017-04-24 21:10:35 +02:00
VolhavenTravelAgency : "Volhaven Travel Agency" ,
VolhavenZBInstituteOfTechnology : "ZB Institute of Technology" ,
VolhavenOmniTekIncorporated : "OmniTek Incorporated" ,
VolhavenNWO : "NWO" ,
VolhavenHeliosLabs : "Helios Labs" ,
VolhavenOmniaCybersystems : "Omnia Cybersystems" ,
VolhavenLexoCorp : "LexoCorp" ,
VolhavenSysCoreSecurities : "SysCore Securities" ,
VolhavenCompuTek : "CompuTek" ,
VolhavenMilleniumFitnessGym : "Millenium Fitness Gym" ,
2017-05-03 19:52:54 +02:00
VolhavenSlums : "Volhaven Slums" ,
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
//Generic locations
Hospital : "Hospital" ,
WorldStockExchange : "World Stock Exchange" ,
2017-01-31 06:19:32 +01:00
}
2017-08-30 19:44:29 +02:00
function displayLocationContent ( ) {
2017-02-03 00:33:47 +01:00
if ( Engine . debug ) {
console . log ( "displayLocationContent() called with location " + Player . location )
}
2017-07-28 16:19:28 +02:00
2017-09-12 01:14:51 +02:00
var returnToWorld = document . getElementById ( "location-return-to-world-button" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var locationName = document . getElementById ( "location-name" ) ;
var locationInfo = document . getElementById ( "location-info" ) ;
var softwareJob = document . getElementById ( "location-software-job" ) ;
var softwareConsultantJob = document . getElementById ( "location-software-consultant-job" )
var itJob = document . getElementById ( "location-it-job" ) ;
var securityEngineerJob = document . getElementById ( "location-security-engineer-job" ) ;
var networkEngineerJob = document . getElementById ( "location-network-engineer-job" ) ;
var businessJob = document . getElementById ( "location-business-job" ) ;
var businessConsultantJob = document . getElementById ( "location-business-consultant-job" ) ;
var securityJob = document . getElementById ( "location-security-job" ) ;
var agentJob = document . getElementById ( "location-agent-job" ) ;
var employeeJob = document . getElementById ( "location-employee-job" ) ;
var employeePartTimeJob = document . getElementById ( "location-parttime-employee-job" ) ;
var waiterJob = document . getElementById ( "location-waiter-job" ) ;
var waiterPartTimeJob = document . getElementById ( "location-parttime-waiter-job" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var work = clearEventListeners ( "location-work" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var jobTitle = document . getElementById ( "location-job-title" ) ;
var jobReputation = document . getElementById ( "location-job-reputation" ) ;
2017-06-20 18:11:33 +02:00
var companyFavor = document . getElementById ( "location-company-favor" ) ;
var locationTxtDiv1 = document . getElementById ( "location-text-divider-1" ) ;
var locationTxtDiv2 = document . getElementById ( "location-text-divider-2" ) ;
var locationTxtDiv3 = document . getElementById ( "location-text-divider-3" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var gymTrainStr = document . getElementById ( "location-gym-train-str" ) ;
var gymTrainDef = document . getElementById ( "location-gym-train-def" ) ;
var gymTrainDex = document . getElementById ( "location-gym-train-dex" ) ;
var gymTrainAgi = document . getElementById ( "location-gym-train-agi" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var studyComputerScience = document . getElementById ( "location-study-computer-science" ) ;
var classDataStructures = document . getElementById ( "location-data-structures-class" ) ;
var classNetworks = document . getElementById ( "location-networks-class" ) ;
var classAlgorithms = document . getElementById ( "location-algorithms-class" ) ;
var classManagement = document . getElementById ( "location-management-class" ) ;
var classLeadership = document . getElementById ( "location-leadership-class" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var purchase2gb = document . getElementById ( "location-purchase-2gb" ) ;
var purchase4gb = document . getElementById ( "location-purchase-4gb" ) ;
var purchase8gb = document . getElementById ( "location-purchase-8gb" ) ;
var purchase16gb = document . getElementById ( "location-purchase-16gb" ) ;
var purchase32gb = document . getElementById ( "location-purchase-32gb" ) ;
var purchase64gb = document . getElementById ( "location-purchase-64gb" ) ;
var purchase128gb = document . getElementById ( "location-purchase-128gb" ) ;
var purchase256gb = document . getElementById ( "location-purchase-256gb" ) ;
var purchase512gb = document . getElementById ( "location-purchase-512gb" ) ;
var purchase1tb = document . getElementById ( "location-purchase-1tb" ) ;
var purchaseTor = document . getElementById ( "location-purchase-tor" ) ;
var purchaseHomeRam = document . getElementById ( "location-purchase-home-ram" ) ;
2017-10-10 06:56:48 +02:00
var purchaseHomeCores = document . getElementById ( "location-purchase-home-cores" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var travelAgencyText = document . getElementById ( "location-travel-agency-text" ) ;
var travelToAevum = document . getElementById ( "location-travel-to-aevum" ) ;
var travelToChongqing = document . getElementById ( "location-travel-to-chongqing" ) ;
var travelToSector12 = document . getElementById ( "location-travel-to-sector12" ) ;
var travelToNewTokyo = document . getElementById ( "location-travel-to-newtokyo" ) ;
var travelToIshima = document . getElementById ( "location-travel-to-ishima" ) ;
var travelToVolhaven = document . getElementById ( "location-travel-to-volhaven" ) ;
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
var infiltrate = clearEventListeners ( "location-infiltrate" ) ;
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
var hospitalTreatment = document . getElementById ( "location-hospital-treatment" ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var slumsDescText = document . getElementById ( "location-slums-description" ) ;
var slumsShoplift = document . getElementById ( "location-slums-shoplift" ) ;
2017-08-01 21:03:45 +02:00
var slumsRobStore = document . getElementById ( "location-slums-rob-store" ) ;
2017-05-10 19:42:46 +02:00
var slumsMug = document . getElementById ( "location-slums-mug" ) ;
2017-08-01 21:03:45 +02:00
var slumsLarceny = document . getElementById ( "location-slums-larceny" ) ;
2017-05-10 19:42:46 +02:00
var slumsDealDrugs = document . getElementById ( "location-slums-deal-drugs" ) ;
2017-10-12 04:00:22 +02:00
var slumsBondForgery = document . getElementById ( "location-slums-bond-forgery" ) ;
2017-05-10 19:42:46 +02:00
var slumsTrafficArms = document . getElementById ( "location-slums-traffic-arms" ) ;
var slumsHomicide = document . getElementById ( "location-slums-homicide" ) ;
var slumsGta = document . getElementById ( "location-slums-gta" ) ;
var slumsKidnap = document . getElementById ( "location-slums-kidnap" ) ;
var slumsAssassinate = document . getElementById ( "location-slums-assassinate" ) ;
var slumsHeist = document . getElementById ( "location-slums-heist" ) ;
2017-07-28 16:19:28 +02:00
2017-12-02 04:50:08 +01:00
var cityHallCreateCorporation = document . getElementById ( "location-cityhall-create-corporation" ) ;
2018-05-02 19:38:11 +02:00
var nsaBladeburner = document . getElementById ( "location-nsa-bladeburner" ) ;
2017-02-03 23:05:59 +01:00
var loc = Player . location ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
returnToWorld . addEventListener ( "click" , function ( ) {
Engine . loadWorldContent ( ) ;
} ) ;
locationName . innerHTML = loc ;
locationName . style . display = "block" ;
locationInfo . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
softwareJob . style . display = "none" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "none" ;
2017-01-31 06:19:32 +01:00
itJob . style . display = "none" ;
securityEngineerJob . style . display = "none" ;
networkEngineerJob . style . display = "none" ;
businessJob . style . display = "none" ;
2017-05-10 19:42:46 +02:00
businessConsultantJob . style . display = "none" ;
2017-01-31 06:19:32 +01:00
securityJob . style . display = "none" ;
agentJob . style . display = "none" ;
employeeJob . style . display = "none" ;
2017-05-10 19:42:46 +02:00
employeePartTimeJob . style . display = "none" ;
2017-01-31 06:19:32 +01:00
waiterJob . style . display = "none" ;
2017-05-10 19:42:46 +02:00
waiterPartTimeJob . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-02-24 16:11:45 +01:00
softwareJob . innerHTML = "Apply for Software Job" ;
2017-05-22 09:50:48 +02:00
softwareConsultantJob . innerHTML = "Apply for a Software Consultant job" ;
2017-02-24 16:11:45 +01:00
itJob . innerHTML = "Apply for IT Job" ;
securityEngineerJob . innerHTML = "Apply for Security Engineer Job" ;
networkEngineerJob . innerHTML = "Apply for Network Engineer Job" ;
businessJob . innerHTML = "Apply for Business Job" ;
2017-05-22 09:50:48 +02:00
businessConsultantJob . innerHTML = "Apply for a Business Consultant Job" ;
2017-02-24 16:11:45 +01:00
securityJob . innerHTML = "Apply for Security Job" ;
agentJob . innerHTML = "Apply for Agent Job" ;
employeeJob . innerHTML = "Apply to be an Employee" ;
2017-05-22 09:50:48 +02:00
employeePartTimeJob . innerHTML = "Apply to be a Part-time Employee" ;
2017-02-24 16:11:45 +01:00
waiterJob . innerHTML = "Apply to be a Waiter" ;
2017-05-22 09:50:48 +02:00
waiterPartTimeJob . innerHTML = "Apply to be a Part-time Waiter"
2017-07-28 16:19:28 +02:00
2017-02-08 01:27:11 +01:00
work . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
gymTrainStr . style . display = "none" ;
gymTrainDef . style . display = "none" ;
gymTrainDex . style . display = "none" ;
gymTrainAgi . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-04-24 21:10:35 +02:00
studyComputerScience . style . display = "none" ;
classDataStructures . style . display = "none" ;
classNetworks . style . display = "none" ;
classAlgorithms . style . display = "none" ;
2017-04-25 21:14:01 +02:00
classManagement . style . display = "none" ;
classLeadership . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-01-31 06:19:32 +01:00
purchase2gb . style . display = "none" ;
purchase4gb . style . display = "none" ;
purchase8gb . style . display = "none" ;
purchase16gb . style . display = "none" ;
purchase32gb . style . display = "none" ;
purchase64gb . style . display = "none" ;
purchase128gb . style . display = "none" ;
purchase256gb . style . display = "none" ;
purchase512gb . style . display = "none" ;
purchase1tb . style . display = "none" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "none" ;
2017-04-25 23:35:17 +02:00
purchaseHomeRam . style . display = "none" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-05-16 17:55:05 +02:00
purchase2gb . innerHTML = "Purchase 2GB Server - $" + formatNumber ( 2 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase4gb . innerHTML = "Purchase 4GB Server - $" + formatNumber ( 4 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase8gb . innerHTML = "Purchase 8GB Server - $" + formatNumber ( 8 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase16gb . innerHTML = "Purchase 16GB Server - $" + formatNumber ( 16 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase32gb . innerHTML = "Purchase 32GB Server - $" + formatNumber ( 32 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase64gb . innerHTML = "Purchase 64GB Server - $" + formatNumber ( 64 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase128gb . innerHTML = "Purchase 128GB Server - $" + formatNumber ( 128 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase256gb . innerHTML = "Purchase 256GB Server - $" + formatNumber ( 256 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase512gb . innerHTML = "Purchase 512GB Server - $" + formatNumber ( 512 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
purchase1tb . innerHTML = "Purchase 1TB Server - $" + formatNumber ( 1024 * CONSTANTS . BaseCostFor1GBOfRamServer , 2 ) ;
2018-06-14 21:51:06 +02:00
if ( ! SpecialServerIps . hasOwnProperty ( "Darkweb Server" ) ) {
2018-06-21 19:52:34 +02:00
purchaseTor . classList . add ( "a-link-button" ) ;
purchaseTor . classList . remove ( "a-link-button-bought" ) ;
2018-06-14 21:51:06 +02:00
purchaseTor . innerHTML = "Purchase TOR Router - $" + formatNumber ( CONSTANTS . TorRouterCost , 2 ) ;
2018-06-21 19:00:33 +02:00
} else {
2018-06-21 19:52:34 +02:00
purchaseTor . classList . remove ( "a-link-button" ) ;
purchaseTor . classList . add ( "a-link-button-bought" ) ;
2018-06-21 19:00:33 +02:00
purchaseTor . innerHTML = "TOR Router - Purchased" ;
2018-06-14 21:51:06 +02:00
}
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "none" ;
2017-01-31 06:19:32 +01:00
travelToAevum . style . display = "none" ;
travelToChongqing . style . display = "none" ;
travelToSector12 . style . display = "none" ;
travelToNewTokyo . style . display = "none" ;
travelToIshima . style . display = "none" ;
travelToVolhaven . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
infiltrate . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
hospitalTreatment . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-05-03 19:52:54 +02:00
slumsDescText . style . display = "none" ;
slumsShoplift . style . display = "none" ;
2017-08-01 21:03:45 +02:00
slumsRobStore . style . display = "none" ;
2017-05-03 19:52:54 +02:00
slumsMug . style . display = "none" ;
2017-08-01 21:03:45 +02:00
slumsLarceny . style . display = "none" ;
2017-05-03 19:52:54 +02:00
slumsDealDrugs . style . display = "none" ;
2017-10-12 04:00:22 +02:00
slumsBondForgery . style . display = "none" ;
2017-05-03 19:52:54 +02:00
slumsTrafficArms . style . display = "none" ;
slumsHomicide . style . display = "none" ;
2017-05-08 18:00:34 +02:00
slumsGta . style . display = "none" ;
2017-05-03 19:52:54 +02:00
slumsKidnap . style . display = "none" ;
2017-05-08 18:00:34 +02:00
slumsAssassinate . style . display = "none" ;
slumsHeist . style . display = "none" ;
2017-07-28 16:19:28 +02:00
2017-12-02 04:50:08 +01:00
cityHallCreateCorporation . style . display = "none" ;
2018-05-02 19:38:11 +02:00
nsaBladeburner . style . display = "none" ;
2017-12-02 04:50:08 +01:00
2017-02-06 06:01:01 +01:00
//Check if the player is employed at this Location. If he is, display the "Work" button,
//update the job title, etc.
2017-09-12 01:14:51 +02:00
if ( loc != "" && loc === Player . companyName ) {
2017-02-08 01:27:11 +01:00
var company = Companies [ loc ] ;
2017-07-28 16:19:28 +02:00
2017-02-16 19:52:11 +01:00
jobTitle . style . display = "block" ;
2017-06-20 18:11:33 +02:00
jobReputation . style . display = "inline" ;
companyFavor . style . display = "inline" ;
locationTxtDiv1 . style . display = "block" ;
locationTxtDiv2 . style . display = "block" ;
locationTxtDiv3 . style . display = "block" ;
2017-02-06 06:01:01 +01:00
jobTitle . innerHTML = "Job Title: " + Player . companyPosition . positionName ;
2017-08-03 06:21:15 +02:00
var repGain = company . getFavorGain ( ) ;
if ( repGain . length != 2 ) { repGain = 0 ; }
repGain = repGain [ 0 ] ;
2017-07-28 16:19:28 +02:00
jobReputation . innerHTML = "Company reputation: " + formatNumber ( company . playerReputation , 4 ) +
"<span class='tooltiptext'>You will earn " +
2018-06-12 19:54:12 +02:00
formatNumber ( repGain , 0 ) +
2017-06-20 18:11:33 +02:00
" faction favor upon resetting after installing an Augmentation</span>" ;
2018-06-12 19:54:12 +02:00
companyFavor . innerHTML = "Company Favor: " + formatNumber ( company . favor , 0 ) +
2017-07-28 16:19:28 +02:00
"<span class='tooltiptext'>Company favor increases the rate at which " +
"you earn reputation for this company by 1% per favor. Company favor " +
2017-06-20 18:11:33 +02:00
"is gained whenever you reset after installing an Augmentation. The amount of " +
"favor you gain depends on how much reputation you have with the company</span>" ;
2017-02-06 06:01:01 +01:00
work . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var currPos = Player . companyPosition ;
2017-07-28 16:19:28 +02:00
2017-02-06 06:01:01 +01:00
work . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
if ( currPos . isPartTimeJob ( ) ) {
Player . startWorkPartTime ( ) ;
} else {
Player . startWork ( ) ;
}
2017-02-06 06:01:01 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-28 22:20:37 +01:00
//Change the text for the corresponding position from "Apply for X Job" to "Apply for promotion"
2017-02-24 16:11:45 +01:00
if ( currPos . isSoftwareJob ( ) ) {
softwareJob . innerHTML = "Apply for a promotion (Software)" ;
2017-05-10 19:42:46 +02:00
} else if ( currPos . isSoftwareConsultantJob ( ) ) {
softwareConsultantJob . innerHTML = "Apply for a promotion (Software Consultant)" ;
2017-02-24 16:11:45 +01:00
} else if ( currPos . isITJob ( ) ) {
itJob . innerHTML = "Apply for a promotion (IT)" ;
} else if ( currPos . isSecurityEngineerJob ( ) ) {
securityEngineerJob . innerHTML = "Apply for a promotion (Security Engineer)" ;
} else if ( currPos . isNetworkEngineerJob ( ) ) {
networkEngineerJob . innerHTML = "Apply for a promotion (Network Engineer)" ;
} else if ( currPos . isBusinessJob ( ) ) {
businessJob . innerHTML = "Apply for a promotion (Business)" ;
2017-05-10 19:42:46 +02:00
} else if ( currPos . isBusinessConsultantJob ( ) ) {
businessConsultantJob . innerHTML = "Apply for a promotion (Business Consultant)" ;
2017-02-24 16:11:45 +01:00
} else if ( currPos . isSecurityJob ( ) ) {
securityJob . innerHTML = "Apply for a promotion (Security)" ;
} else if ( currPos . isAgentJob ( ) ) {
agentJob . innerHTML = "Apply for a promotion (Agent)" ;
}
2017-02-08 01:27:11 +01:00
} else {
jobTitle . style . display = "none" ;
jobReputation . style . display = "none" ;
2017-06-20 18:11:33 +02:00
companyFavor . style . display = "none" ;
locationTxtDiv1 . style . display = "none" ;
locationTxtDiv2 . style . display = "none" ;
locationTxtDiv3 . style . display = "none" ;
2017-02-08 01:27:11 +01:00
}
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
//Calculate hospital Cost
if ( Player . hp < 0 ) { Player . hp = 0 ; }
var hospitalTreatmentCost = ( Player . max _hp - Player . hp ) * CONSTANTS . HospitalCostPerHp ;
2017-07-28 16:19:28 +02:00
//Set tooltip for job requirements
setJobRequirementTooltip ( loc , CompanyPositions . SoftwareIntern , softwareJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . SoftwareConsultant , softwareConsultantJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . ITIntern , itJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . SecurityEngineer , securityEngineerJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . NetworkEngineer , networkEngineerJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . BusinessIntern , businessJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . BusinessConsultant , businessConsultantJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . SecurityGuard , securityJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . FieldAgent , agentJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . Employee , employeeJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . PartTimeEmployee , employeePartTimeJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . Waiter , waiterJob ) ;
setJobRequirementTooltip ( loc , CompanyPositions . PartTimeWaiter , waiterPartTimeJob ) ;
2017-02-03 00:33:47 +01:00
switch ( loc ) {
2017-07-28 16:19:28 +02:00
case Locations . AevumTravelAgency :
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToChongqing . style . display = "block" ;
travelToSector12 . style . display = "block" ;
travelToNewTokyo . style . display = "block" ;
travelToIshima . style . display = "block" ;
travelToVolhaven . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
2017-05-15 08:35:09 +02:00
case Locations . AevumSummitUniversity :
2017-05-10 19:42:46 +02:00
var costMult = 4 , expMult = 3 ;
2017-04-24 21:10:35 +02:00
displayUniversityLocationContent ( costMult ) ;
2017-04-25 21:14:01 +02:00
setUniversityLocationButtons ( costMult , expMult ) ;
2017-04-24 21:10:35 +02:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumECorp :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase128gb . style . display = "block" ;
purchase256gb . style . display = "block" ;
purchase512gb . style . display = "block" ;
purchase1tb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumECorp ,
2018-07-18 23:11:44 +02:00
4800 , 116 , 150 , 6 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumBachmanAndAssociates :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumBachmanAndAssociates ,
2018-07-18 23:11:44 +02:00
1350 , 42 , 60 , 4.1 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumClarkeIncorporated :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumClarkeIncorporated ,
2018-07-18 23:11:44 +02:00
1800 , 34 , 75 , 3.6 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumFulcrumTechnologies :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase128gb . style . display = "block" ;
purchase256gb . style . display = "block" ;
purchase512gb . style . display = "block" ;
purchase1tb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumFulcrumTechnologies ,
2018-07-18 23:11:44 +02:00
4140 , 96 , 100 , 6.2 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumAeroCorp :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumAeroCorp ,
2018-07-18 23:11:44 +02:00
1350 , 32 , 50 , 4.4 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumGalacticCybersystems :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumGalacticCybersystems ,
2018-07-18 23:11:44 +02:00
1260 , 30 , 50 , 3.95 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumWatchdogSecurity :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
agentJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumWatchdogSecurity ,
2018-07-18 23:11:44 +02:00
690 , 20 , 30 , 3 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumRhoConstruction :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
businessJob . style . display = "block" ;
setInfiltrateButton ( infiltrate , Locations . AevumRhoConstruction ,
2018-07-18 23:11:44 +02:00
485 , 16 , 20 , 1.9 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumPolice :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-07-03 21:42:11 +02:00
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumPolice ,
2018-07-18 23:11:44 +02:00
565 , 18 , 25 , 2.2 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumNetLinkTechnologies :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase2gb . style . display = "block" ;
purchase4gb . style . display = "block" ;
purchase8gb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-03 21:42:11 +02:00
setInfiltrateButton ( infiltrate , Locations . AevumNetLinkTechnologies ,
2018-07-18 23:11:44 +02:00
144 , 10 , 25 , 1.4 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-05-10 19:42:46 +02:00
case Locations . AevumCrushFitnessGym :
2018-05-10 19:14:45 +02:00
var costMult = 3 , expMult = 2 ;
2017-05-10 19:42:46 +02:00
displayGymLocationContent ( costMult ) ;
setGymLocationButtons ( costMult , expMult ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . AevumSnapFitnessGym :
2018-05-10 19:14:45 +02:00
var costMult = 10 , expMult = 5 ;
2017-05-10 19:42:46 +02:00
displayGymLocationContent ( costMult ) ;
setGymLocationButtons ( costMult , expMult ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . ChongqingTravelAgency :
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToAevum . style . display = "block" ;
travelToSector12 . style . display = "block" ;
travelToNewTokyo . style . display = "block" ;
travelToIshima . style . display = "block" ;
2017-07-28 16:19:28 +02:00
travelToVolhaven . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . ChongqingKuaiGongInternational :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-03 21:42:11 +02:00
setInfiltrateButton ( infiltrate , Locations . ChongqingKuaiGongInternational ,
2018-07-18 23:11:44 +02:00
4450 , 100 , 100 , 6.1 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . ChongqingSolarisSpaceSystems :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-03 21:42:11 +02:00
setInfiltrateButton ( infiltrate , Locations . ChongqingSolarisSpaceSystems ,
2018-07-18 23:11:44 +02:00
2915 , 52 , 75 , 6 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12TravelAgency :
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToAevum . style . display = "block" ;
travelToChongqing . style . display = "block" ;
travelToNewTokyo . style . display = "block" ;
travelToIshima . style . display = "block" ;
travelToVolhaven . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
2017-04-24 21:10:35 +02:00
case Locations . Sector12RothmanUniversity :
2017-05-10 19:42:46 +02:00
var costMult = 3 , expMult = 2 ;
2017-04-25 21:14:01 +02:00
displayUniversityLocationContent ( costMult ) ;
setUniversityLocationButtons ( costMult , expMult ) ;
2017-04-24 21:10:35 +02:00
break ;
2017-01-31 06:19:32 +01:00
2017-07-28 16:19:28 +02:00
case Locations . Sector12MegaCorp :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-03 21:42:11 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12MegaCorp ,
2018-07-18 23:11:44 +02:00
4500 , 114 , 125 , 6.75 ) ;
2017-02-03 00:33:47 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12BladeIndustries :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12BladeIndustries ,
2018-07-18 23:11:44 +02:00
2160 , 46 , 100 , 4.2 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12FourSigma :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12FourSigma ,
2018-07-18 23:11:44 +02:00
1350 , 58 , 100 , 7 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12IcarusMicrosystems :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12IcarusMicrosystems ,
2018-07-18 23:11:44 +02:00
730 , 32 , 70 , 5.4 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12UniversalEnergy :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12UniversalEnergy ,
2018-07-18 23:11:44 +02:00
700 , 24 , 50 , 4.3 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12DeltaOne :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12DeltaOne ,
2018-07-18 23:11:44 +02:00
970 , 38 , 75 , 4.5 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12CIA :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
agentJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12CIA ,
2018-07-18 23:11:44 +02:00
1170 , 44 , 80 , 4.6 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . Sector12NSA :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
agentJob . style . display = "block" ;
2018-05-02 19:38:11 +02:00
if ( Player . bitNodeN === 6 || hasBladeburnerSF === true ) {
2018-06-03 03:37:56 +02:00
if ( Player . bitNodeN === 8 ) { break ; }
2018-05-02 19:38:11 +02:00
if ( Player . bladeburner instanceof Bladeburner ) {
//Note: Can't infiltrate NSA when part of bladeburner
nsaBladeburner . innerText = "Enter Bladeburner Headquarters" ;
} else {
setInfiltrateButton ( infiltrate , Locations . Sector12NSA ,
2018-07-18 23:11:44 +02:00
1135 , 40 , 80 , 5 ) ;
2018-05-02 19:38:11 +02:00
nsaBladeburner . innerText = "Apply to Bladeburner Division" ;
}
nsaBladeburner . style . display = "block" ;
} else {
setInfiltrateButton ( infiltrate , Locations . Sector12NSA ,
2018-07-18 23:11:44 +02:00
1135 , 40 , 80 , 5 ) ;
2018-05-02 19:38:11 +02:00
}
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12AlphaEnterprises :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
businessJob . style . display = "block" ;
2017-02-06 02:29:17 +01:00
purchase2gb . style . display = "block" ;
purchase4gb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12AlphaEnterprises ,
2018-07-18 23:11:44 +02:00
200 , 14 , 40 , 2.25 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12CarmichaelSecurity :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
agentJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12CarmichaelSecurity ,
2018-07-18 23:11:44 +02:00
405 , 18 , 60 , 2.5 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12FoodNStuff :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
employeeJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
employeePartTimeJob . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12JoesGuns :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
employeeJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
employeePartTimeJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . Sector12JoesGuns ,
2018-06-25 19:29:51 +02:00
120 , 8 , 20 , 1.8 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . Sector12IronGym :
2017-05-10 19:42:46 +02:00
var costMult = 1 , expMult = 1 ;
displayGymLocationContent ( costMult ) ;
setGymLocationButtons ( costMult , expMult ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-02-03 23:05:59 +01:00
case Locations . Sector12PowerhouseGym :
2018-05-10 19:14:45 +02:00
var costMult = 20 , expMult = 10 ;
2017-05-10 19:42:46 +02:00
displayGymLocationContent ( costMult ) ;
setGymLocationButtons ( costMult , expMult ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-12-02 04:50:08 +01:00
case Locations . Sector12CityHall :
cityHallCreateCorporation . style . display = "block" ;
if ( Player . corporation instanceof Corporation ) {
cityHallCreateCorporation . className = "a-link-button-inactive" ;
} else {
cityHallCreateCorporation . className = "a-link-button" ;
}
break ;
2017-07-28 16:19:28 +02:00
case Locations . NewTokyoTravelAgency :
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToAevum . style . display = "block" ;
travelToChongqing . style . display = "block" ;
travelToSector12 . style . display = "block" ;
travelToIshima . style . display = "block" ;
travelToVolhaven . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
2017-02-03 00:33:47 +01:00
case Locations . NewTokyoDefComm :
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . NewTokyoDefComm ,
2018-07-18 23:11:44 +02:00
1050 , 28 , 70 , 4 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . NewTokyoVitaLife :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . NewTokyoVitaLife ,
2018-07-18 23:11:44 +02:00
605 , 22 , 100 , 3.5 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . NewTokyoGlobalPharmaceuticals :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . NewTokyoGlobalPharmaceuticals ,
2018-07-18 23:11:44 +02:00
700 , 24 , 80 , 3.8 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . NewTokyoNoodleBar :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
waiterJob . style . display = "block" ;
2017-08-13 07:01:33 +02:00
waiterPartTimeJob . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
2017-04-13 19:33:34 +02:00
case Locations . IshimaTravelAgency :
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToAevum . style . display = "block" ;
travelToChongqing . style . display = "block" ;
travelToSector12 . style . display = "block" ;
travelToNewTokyo . style . display = "block" ;
travelToVolhaven . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . IshimaStormTechnologies :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-01-31 06:19:32 +01:00
securityJob . style . display = "none" ;
agentJob . style . display = "none" ;
employeeJob . style . display = "none" ;
2017-07-28 16:19:28 +02:00
waiterJob . style . display = "none" ;
2017-02-03 23:05:59 +01:00
purchase32gb . style . display = "block" ;
purchase64gb . style . display = "block" ;
purchase128gb . style . display = "block" ;
purchase256gb . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . IshimaStormTechnologies ,
2018-07-18 23:11:44 +02:00
570 , 24 , 100 , 4.1 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . IshimaNovaMedical :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . IshimaNovaMedical ,
2018-07-18 23:11:44 +02:00
485 , 20 , 50 , 3.2 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . IshimaOmegaSoftware :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
businessJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase4gb . style . display = "block" ;
purchase8gb . style . display = "block" ;
purchase16gb . style . display = "block" ;
purchase32gb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . IshimaOmegaSoftware ,
2018-06-25 19:29:51 +02:00
130 , 10 , 40 , 1.6 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-04-24 21:10:35 +02:00
case Locations . VolhavenTravelAgency :
2017-04-13 19:33:34 +02:00
travelAgencyText . style . display = "block" ;
2017-02-03 00:33:47 +01:00
travelToAevum . style . display = "block" ;
travelToChongqing . style . display = "block" ;
travelToSector12 . style . display = "block" ;
travelToNewTokyo . style . display = "block" ;
travelToIshima . style . display = "block" ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
2017-04-24 21:10:35 +02:00
case Locations . VolhavenZBInstituteOfTechnology :
2017-05-10 19:42:46 +02:00
var costMult = 5 , expMult = 4 ;
2017-04-25 21:14:01 +02:00
displayUniversityLocationContent ( costMult ) ;
setUniversityLocationButtons ( costMult , expMult ) ;
2017-04-24 21:10:35 +02:00
break ;
2017-01-31 06:19:32 +01:00
2017-07-28 16:19:28 +02:00
case Locations . VolhavenOmniTekIncorporated :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase128gb . style . display = "block" ;
purchase256gb . style . display = "block" ;
purchase512gb . style . display = "block" ;
purchase1tb . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenOmniTekIncorporated ,
2018-07-18 23:11:44 +02:00
1215 , 44 , 100 , 4.4 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . VolhavenNWO :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenNWO ,
2018-07-18 23:11:44 +02:00
1460 , 56 , 200 , 6.8 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . VolhavenHeliosLabs :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenHeliosLabs ,
2018-07-18 23:11:44 +02:00
1080 , 28 , 75 , 3 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . VolhavenOmniaCybersystems :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenOmniaCybersystems ,
2018-07-18 23:11:44 +02:00
725 , 28 , 90 , 4.9 ) ;
2017-01-31 06:19:32 +01:00
break ;
case Locations . VolhavenLexoCorp :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
businessJob . style . display = "block" ;
securityJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenLexoCorp ,
2018-07-18 23:11:44 +02:00
340 , 14 , 60 , 2 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . VolhavenSysCoreSecurities :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenSysCoreSecurities ,
2018-07-18 23:11:44 +02:00
430 , 18 , 75 , 2.4 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . VolhavenCompuTek :
2017-02-03 00:33:47 +01:00
locationInfo . innerHTML = Companies [ loc ] . info ;
2017-07-28 16:19:28 +02:00
2017-02-03 00:33:47 +01:00
softwareJob . style . display = "block" ;
2017-05-10 19:42:46 +02:00
softwareConsultantJob . style . display = "block" ;
2017-02-03 00:33:47 +01:00
itJob . style . display = "block" ;
securityEngineerJob . style . display = "block" ;
networkEngineerJob . style . display = "block" ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
purchase8gb . style . display = "block" ;
purchase16gb . style . display = "block" ;
purchase32gb . style . display = "block" ;
purchase64gb . style . display = "block" ;
purchase128gb . style . display = "block" ;
purchase256gb . style . display = "block" ;
2017-04-13 22:21:03 +02:00
purchaseTor . style . display = "block" ;
2017-04-26 00:24:08 +02:00
purchaseHomeRam . style . display = "block" ;
2017-10-10 06:56:48 +02:00
purchaseHomeCores . style . display = "block" ;
2017-07-28 16:19:28 +02:00
setInfiltrateButton ( infiltrate , Locations . VolhavenCompuTek ,
2018-07-18 23:11:44 +02:00
195 , 12 , 60 , 2.1 ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
case Locations . VolhavenMilleniumFitnessGym :
2018-05-10 19:14:45 +02:00
var costMult = 7 , expMult = 4 ;
2017-05-10 19:42:46 +02:00
displayGymLocationContent ( costMult ) ;
setGymLocationButtons ( costMult , expMult ) ;
2017-01-31 06:19:32 +01:00
break ;
2017-07-28 16:19:28 +02:00
2017-05-03 19:52:54 +02:00
//All Slums
case Locations . AevumSlums :
case Locations . ChongqingSlums :
case Locations . Sector12Slums :
2017-05-30 03:25:52 +02:00
case Locations . NewTokyoSlums :
2017-05-03 19:52:54 +02:00
case Locations . IshimaSlums :
case Locations . VolhavenSlums :
2018-05-29 22:36:52 +02:00
var shopliftChance = Crimes . Shoplift . successRate ( ) ;
var robStoreChance = Crimes . RobStore . successRate ( ) ;
var mugChance = Crimes . Mug . successRate ( ) ;
var larcenyChance = Crimes . Larceny . successRate ( ) ;
var drugsChance = Crimes . DealDrugs . successRate ( ) ;
var bondChance = Crimes . BondForgery . successRate ( ) ;
var armsChance = Crimes . TraffickArms . successRate ( ) ;
var homicideChance = Crimes . Homicide . successRate ( ) ;
var gtaChance = Crimes . GrandTheftAuto . successRate ( ) ;
var kidnapChance = Crimes . Kidnap . successRate ( ) ;
var assassinateChance = Crimes . Assassination . successRate ( ) ;
var heistChance = Crimes . Heist . successRate ( ) ;
2017-07-28 16:19:28 +02:00
2017-05-03 19:52:54 +02:00
slumsDescText . style . display = "block" ;
slumsShoplift . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsShoplift . innerHTML = "Shoplift (" + ( shopliftChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-07-29 18:25:40 +02:00
slumsShoplift . innerHTML += '<span class="tooltiptext"> Attempt to shoplift from a low-end retailer </span>' ;
2017-08-01 21:03:45 +02:00
slumsRobStore . style . display = "block" ;
slumsRobStore . innerHTML = "Rob store(" + ( robStoreChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
slumsRobStore . innerHTML += '<span class="tooltiptext">Attempt to commit armed robbery on a high-end store </span>' ;
2017-05-03 19:52:54 +02:00
slumsMug . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsMug . innerHTML = "Mug someone (" + ( mugChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsMug . innerHTML += '<span class="tooltiptext"> Attempt to mug a random person on the street </span>' ;
2017-08-01 21:03:45 +02:00
slumsLarceny . style . display = "block" ;
slumsLarceny . innerHTML = "Larceny (" + ( larcenyChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
slumsLarceny . innerHTML += "<span class='tooltiptext'> Attempt to rob property from someone's house </span>" ;
2017-05-03 19:52:54 +02:00
slumsDealDrugs . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsDealDrugs . innerHTML = "Deal Drugs (" + ( drugsChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsDealDrugs . innerHTML += '<span class="tooltiptext"> Attempt to deal drugs </span>' ;
2017-10-12 04:00:22 +02:00
slumsBondForgery . style . display = "block" ;
slumsBondForgery . innerHTML = "Bond Forgery(" + ( bondChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
slumsBondForgery . innerHTML += "<span class='tooltiptext'> Attempt to forge corporate bonds</span>" ;
2017-05-03 19:52:54 +02:00
slumsTrafficArms . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsTrafficArms . innerHTML = "Traffick Illegal Arms (" + ( armsChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsTrafficArms . innerHTML += '<span class="tooltiptext"> Attempt to smuggle illegal arms into the city and sell them to gangs and criminal organizations </span>' ;
2017-05-03 19:52:54 +02:00
slumsHomicide . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsHomicide . innerHTML = "Homicide (" + ( homicideChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsHomicide . innerHTML += '<span class="tooltiptext"> Attempt to murder a random person on the street</span>' ;
2017-05-08 18:00:34 +02:00
slumsGta . style . display = "block" ;
slumsGta . innerHTML = "Grand Theft Auto (" + ( gtaChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsGta . innerHTML += '<span class="tooltiptext"> Attempt to commit grand theft auto </span>' ;
2017-05-03 19:52:54 +02:00
slumsKidnap . style . display = "block" ;
2017-05-04 07:05:48 +02:00
slumsKidnap . innerHTML = "Kidnap and Ransom (" + ( kidnapChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsKidnap . innerHTML += '<span class="tooltiptext"> Attempt to kidnap and ransom a high-profile target </span>' ;
2017-05-08 18:00:34 +02:00
slumsAssassinate . style . display = "block" ;
slumsAssassinate . innerHTML = "Assassinate (" + ( assassinateChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsAssassinate . innerHTML += '<span class="tooltiptext"> Attempt to assassinate a high-profile target </span>' ;
2017-05-08 18:00:34 +02:00
slumsHeist . style . display = "block" ;
slumsHeist . innerHTML = "Heist (" + ( heistChance * 100 ) . toFixed ( 3 ) + "% chance of success)" ;
2017-05-08 19:40:53 +02:00
slumsHeist . innerHTML += '<span class="tooltiptext"> Attempt to pull off the ultimate heist </span>' ;
2017-05-04 07:27:22 +02:00
break ;
2017-07-28 16:19:28 +02:00
2017-07-03 21:42:11 +02:00
//Hospital
case Locations . Hospital :
hospitalTreatment . innerText = "Get treatment for wounds - $" + formatNumber ( hospitalTreatmentCost , 2 ) . toString ( ) ;
hospitalTreatment . style . display = "block" ;
break ;
2017-07-28 16:19:28 +02:00
2017-02-28 22:20:37 +01:00
default :
console . log ( "ERROR: INVALID LOCATION" ) ;
2017-01-31 06:19:32 +01:00
}
2017-07-28 16:19:28 +02:00
2017-02-28 22:20:37 +01:00
//Make the "Apply to be Employee and Waiter" texts disappear if you already hold the job
2017-05-10 19:42:46 +02:00
//Includes part-time stuff
2017-02-28 22:20:37 +01:00
if ( loc == Player . companyName ) {
var currPos = Player . companyPosition ;
2017-07-28 16:19:28 +02:00
2017-02-28 22:20:37 +01:00
if ( currPos . positionName == CompanyPositions . Employee . positionName ) {
employeeJob . style . display = "none" ;
} else if ( currPos . positionName == CompanyPositions . Waiter . positionName ) {
waiterJob . style . display = "none" ;
2017-05-10 22:21:15 +02:00
} else if ( currPos . positionName == CompanyPositions . PartTimeEmployee . positionName ) {
2017-05-10 19:42:46 +02:00
employeePartTimeJob . style . display = "none" ;
} else if ( currPos . positionName == CompanyPositions . PartTimeWaiter . positionName ) {
waiterPartTimeJob . style . display = "none" ;
2017-02-28 22:20:37 +01:00
}
}
2017-01-31 06:19:32 +01:00
}
2017-08-30 19:44:29 +02:00
function initLocationButtons ( ) {
2017-02-03 23:05:59 +01:00
//Buttons to travel to different locations in World
2017-08-30 19:44:29 +02:00
let aevumTravelAgency = document . getElementById ( "aevum-travelagency" ) ;
2017-01-31 06:19:32 +01:00
aevumTravelAgency . addEventListener ( "click" , function ( ) {
2017-02-02 04:15:57 +01:00
Player . location = Locations . AevumTravelAgency ;
2017-01-31 06:19:32 +01:00
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-01-31 06:19:32 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumHospital = document . getElementById ( "aevum-hospital" ) ;
2017-07-03 21:42:11 +02:00
aevumHospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumSummitUniversity = document . getElementById ( "aevum-summituniversity" ) ;
2017-04-24 21:10:35 +02:00
aevumSummitUniversity . addEventListener ( "click" , function ( ) {
2017-07-03 21:42:11 +02:00
Player . location = Locations . AevumSummitUniversity ;
2017-04-24 21:10:35 +02:00
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumECorp = document . getElementById ( "aevum-ecorp" ) ;
2017-02-02 04:15:57 +01:00
aevumECorp . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumECorp ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumBachmanAndAssociates = document . getElementById ( "aevum-bachmanandassociates" ) ;
2017-02-02 04:15:57 +01:00
aevumBachmanAndAssociates . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumBachmanAndAssociates ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumClarkeIncorporated = document . getElementById ( "aevum-clarkeincorporated" ) ;
2017-02-02 04:15:57 +01:00
aevumClarkeIncorporated . addEventListener ( "click" , function ( ) {
2017-07-28 16:19:28 +02:00
Player . location = Locations . AevumClarkeIncorporated ;
2017-02-02 04:15:57 +01:00
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumFulcrumTechnologies = document . getElementById ( "aevum-fulcrumtechnologies" ) ;
2017-02-02 04:15:57 +01:00
aevumFulcrumTechnologies . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumFulcrumTechnologies ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumAeroCorp = document . getElementById ( "aevum-aerocorp" ) ;
2017-02-02 04:15:57 +01:00
aevumAeroCorp . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumAeroCorp ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumGalacticCybersystems = document . getElementById ( "aevum-galacticcybersystems" ) ;
2017-02-02 04:15:57 +01:00
aevumGalacticCybersystems . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumGalacticCybersystems ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumWatchdogSecurity = document . getElementById ( "aevum-watchdogsecurity" ) ;
2017-02-02 04:15:57 +01:00
aevumWatchdogSecurity . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumWatchdogSecurity ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumRhoConstruction = document . getElementById ( "aevum-rhoconstruction" ) ;
2017-02-02 04:15:57 +01:00
aevumRhoConstruction . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumRhoConstruction ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumPolice = document . getElementById ( "aevum-aevumpolice" ) ;
2017-02-02 04:15:57 +01:00
aevumPolice . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumPolice ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumNetLinkTechnologies = document . getElementById ( "aevum-netlinktechnologies" ) ;
2017-02-02 04:15:57 +01:00
aevumNetLinkTechnologies . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumNetLinkTechnologies ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumCrushFitnessGym = document . getElementById ( "aevum-crushfitnessgym" ) ;
2017-02-02 04:15:57 +01:00
aevumCrushFitnessGym . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumCrushFitnessGym ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumSnapFitnessGym = document . getElementById ( "aevum-snapfitnessgym" ) ;
2017-02-02 04:15:57 +01:00
aevumSnapFitnessGym . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumSnapFitnessGym ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-02 04:15:57 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let aevumSlums = document . getElementById ( "aevum-slums" ) ;
2017-05-03 19:52:54 +02:00
aevumSlums . addEventListener ( "click" , function ( ) {
Player . location = Locations . AevumSlums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let chongqingTravelAgency = document . getElementById ( "chongqing-travelagency" ) ;
2017-02-03 00:33:47 +01:00
chongqingTravelAgency . addEventListener ( "click" , function ( ) {
Player . location = Locations . ChongqingTravelAgency ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let chongqingHospital = document . getElementById ( "chongqing-hospital" ) ;
2017-07-03 21:42:11 +02:00
chongqingHospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let chongqingKuaiGongInternational = document . getElementById ( "chongqing-kuaigonginternational" ) ;
2017-02-03 00:33:47 +01:00
chongqingKuaiGongInternational . addEventListener ( "click" , function ( ) {
Player . location = Locations . ChongqingKuaiGongInternational ;
2017-07-28 16:19:28 +02:00
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let chongqingSolarisSpaceSystems = document . getElementById ( "chongqing-solarisspacesystems" ) ;
2017-02-03 00:33:47 +01:00
chongqingSolarisSpaceSystems . addEventListener ( "click" , function ( ) {
Player . location = Locations . ChongqingSolarisSpaceSystems ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let chongqingSlums = document . getElementById ( "chongqing-slums" ) ;
2017-05-03 19:52:54 +02:00
chongqingSlums . addEventListener ( "click" , function ( ) {
Player . location = Locations . ChongqingSlums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12TravelAgency = document . getElementById ( "sector12-travelagency" ) ;
2017-02-03 00:33:47 +01:00
sector12TravelAgency . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12TravelAgency ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12Hospital = document . getElementById ( "sector12-hospital" ) ;
2017-07-03 21:42:11 +02:00
sector12Hospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12RothmanUniversity = document . getElementById ( "sector12-rothmanuniversity" ) ;
2017-04-24 21:10:35 +02:00
sector12RothmanUniversity . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12RothmanUniversity ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12MegaCorp = document . getElementById ( "sector12-megacorp" ) ;
2017-02-03 00:33:47 +01:00
sector12MegaCorp . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12MegaCorp ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12BladeIndustries = document . getElementById ( "sector12-bladeindustries" ) ;
2017-02-03 00:33:47 +01:00
sector12BladeIndustries . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12BladeIndustries ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12FourSigma = document . getElementById ( "sector12-foursigma" ) ;
2017-02-03 00:33:47 +01:00
sector12FourSigma . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12FourSigma ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12IcarusMicrosystems = document . getElementById ( "sector12-icarusmicrosystems" ) ;
2017-02-03 00:33:47 +01:00
sector12IcarusMicrosystems . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12IcarusMicrosystems ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12UniversalEnergy = document . getElementById ( "sector12-universalenergy" ) ;
2017-02-03 00:33:47 +01:00
sector12UniversalEnergy . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12UniversalEnergy ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12DeltaOne = document . getElementById ( "sector12-deltaone" ) ;
2017-02-03 00:33:47 +01:00
sector12DeltaOne . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12DeltaOne ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12CIA = document . getElementById ( "sector12-cia" ) ;
2017-02-03 00:33:47 +01:00
sector12CIA . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12CIA ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12NSA = document . getElementById ( "sector12-nsa" ) ;
2017-02-03 00:33:47 +01:00
sector12NSA . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12NSA ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12AlphaEnterprises = document . getElementById ( "sector12-alphaenterprises" ) ;
2017-02-03 00:33:47 +01:00
sector12AlphaEnterprises . addEventListener ( "click" , function ( ) {
2017-07-28 16:19:28 +02:00
Player . location = Locations . Sector12AlphaEnterprises ;
2017-02-03 00:33:47 +01:00
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12CarmichaelSecurity = document . getElementById ( "sector12-carmichaelsecurity" ) ;
2017-02-03 00:33:47 +01:00
sector12CarmichaelSecurity . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12CarmichaelSecurity ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12FoodNStuff = document . getElementById ( "sector12-foodnstuff" ) ;
2017-02-03 00:33:47 +01:00
sector12FoodNStuff . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12FoodNStuff ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12JoesGuns = document . getElementById ( "sector12-joesguns" ) ;
2017-02-03 00:33:47 +01:00
sector12JoesGuns . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12JoesGuns ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12IronGym = document . getElementById ( "sector12-irongym" ) ;
2017-02-03 00:33:47 +01:00
sector12IronGym . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12IronGym ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12PowerhouseGym = document . getElementById ( "sector12-powerhousegym" ) ;
2017-02-03 00:33:47 +01:00
sector12PowerhouseGym . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12PowerhouseGym ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let sector12Slums = document . getElementById ( "sector12-slums" ) ;
2017-05-03 19:52:54 +02:00
sector12Slums . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12Slums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-12-02 04:50:08 +01:00
let sector12CityHall = document . getElementById ( "sector12-cityhall" ) ;
sector12CityHall . addEventListener ( "click" , function ( ) {
Player . location = Locations . Sector12CityHall ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-08-30 19:44:29 +02:00
let newTokyoTravelAgency = document . getElementById ( "newtokyo-travelagency" ) ;
2017-02-03 00:33:47 +01:00
newTokyoTravelAgency . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoTravelAgency ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoHospital = document . getElementById ( "newtokyo-hospital" ) ;
2017-07-03 21:42:11 +02:00
newTokyoHospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoDefComm = document . getElementById ( "newtokyo-defcomm" ) ;
2017-02-03 00:33:47 +01:00
newTokyoDefComm . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoDefComm ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoVitaLife = document . getElementById ( "newtokyo-vitalife" ) ;
2017-02-03 00:33:47 +01:00
newTokyoVitaLife . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoVitaLife ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoGlobalPharmaceuticals = document . getElementById ( "newtokyo-globalpharmaceuticals" ) ;
2017-02-03 00:33:47 +01:00
newTokyoGlobalPharmaceuticals . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoGlobalPharmaceuticals ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoNoodleBar = document . getElementById ( "newtokyo-noodlebar" ) ;
2017-02-03 00:33:47 +01:00
newTokyoNoodleBar . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoNoodleBar ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let newTokyoSlums = document . getElementById ( "newtokyo-slums" ) ;
2017-05-03 19:52:54 +02:00
newTokyoSlums . addEventListener ( "click" , function ( ) {
Player . location = Locations . NewTokyoSlums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaTravelAgency = document . getElementById ( "ishima-travelagency" ) ;
2017-02-03 00:33:47 +01:00
ishimaTravelAgency . addEventListener ( "click" , function ( ) {
Player . location = Locations . IshimaTravelAgency ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaHospital = document . getElementById ( "ishima-hospital" ) ;
2017-07-03 21:42:11 +02:00
ishimaHospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaStormTechnologies = document . getElementById ( "ishima-stormtechnologies" ) ;
2017-02-03 00:33:47 +01:00
ishimaStormTechnologies . addEventListener ( "click" , function ( ) {
Player . location = Locations . IshimaStormTechnologies ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaNovaMedical = document . getElementById ( "ishima-novamedical" ) ;
2017-02-03 00:33:47 +01:00
ishimaNovaMedical . addEventListener ( "click" , function ( ) {
Player . location = Locations . IshimaNovaMedical ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaOmegaSoftware = document . getElementById ( "ishima-omegasoftware" ) ;
2017-02-03 00:33:47 +01:00
ishimaOmegaSoftware . addEventListener ( "click" , function ( ) {
Player . location = Locations . IshimaOmegaSoftware ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let ishimaSlums = document . getElementById ( "ishima-slums" ) ;
2017-05-03 19:52:54 +02:00
ishimaSlums . addEventListener ( "click" , function ( ) {
Player . location = Locations . IshimaSlums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenTravelAgency = document . getElementById ( "volhaven-travelagency" ) ;
2017-02-03 00:33:47 +01:00
volhavenTravelAgency . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenTravelAgency ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenHospital = document . getElementById ( "volhaven-hospital" ) ;
2017-07-03 21:42:11 +02:00
volhavenHospital . addEventListener ( "click" , function ( ) {
Player . location = Locations . Hospital ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenZBInstituteOfTechnology = document . getElementById ( "volhaven-zbinstituteoftechnology" ) ;
2017-04-24 21:10:35 +02:00
volhavenZBInstituteOfTechnology . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenZBInstituteOfTechnology ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenOmniTekIncorporated = document . getElementById ( "volhaven-omnitekincorporated" ) ;
2017-02-03 00:33:47 +01:00
volhavenOmniTekIncorporated . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenOmniTekIncorporated ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenNWO = document . getElementById ( "volhaven-nwo" ) ;
2017-02-03 00:33:47 +01:00
volhavenNWO . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenNWO ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenHeliosLabs = document . getElementById ( "volhaven-helioslabs" ) ;
2017-02-03 00:33:47 +01:00
volhavenHeliosLabs . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenHeliosLabs ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenOmniaCybersystems = document . getElementById ( "volhaven-omniacybersystems" ) ;
2017-02-03 00:33:47 +01:00
volhavenOmniaCybersystems . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenOmniaCybersystems ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenLexoCorp = document . getElementById ( "volhaven-lexocorp" ) ;
2017-02-03 00:33:47 +01:00
volhavenLexoCorp . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenLexoCorp ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenSysCoreSecurities = document . getElementById ( "volhaven-syscoresecurities" ) ;
2017-02-03 00:33:47 +01:00
volhavenSysCoreSecurities . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenSysCoreSecurities ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenCompuTek = document . getElementById ( "volhaven-computek" ) ;
2017-02-03 00:33:47 +01:00
volhavenCompuTek . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenCompuTek ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenMilleniumFitnessGym = document . getElementById ( "volhaven-milleniumfitnessgym" ) ;
2017-02-03 00:33:47 +01:00
volhavenMilleniumFitnessGym . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenMilleniumFitnessGym ;
Engine . loadLocationContent ( ) ;
2017-02-03 23:05:59 +01:00
return false ;
2017-02-03 00:33:47 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-30 19:44:29 +02:00
let volhavenSlums = document . getElementById ( "volhaven-slums" ) ;
2017-05-03 19:52:54 +02:00
volhavenSlums . addEventListener ( "click" , function ( ) {
Player . location = Locations . VolhavenSlums ;
Engine . loadLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
//Buttons to interact at a location (apply for job/promotion, train, purchase, etc.)
2017-05-10 19:42:46 +02:00
var softwareJob = document . getElementById ( "location-software-job" ) ;
var softwareConsultantJob = document . getElementById ( "location-software-consultant-job" )
var itJob = document . getElementById ( "location-it-job" ) ;
var securityEngineerJob = document . getElementById ( "location-security-engineer-job" ) ;
var networkEngineerJob = document . getElementById ( "location-network-engineer-job" ) ;
var businessJob = document . getElementById ( "location-business-job" ) ;
var businessConsultantJob = document . getElementById ( "location-business-consultant-job" ) ;
var securityJob = document . getElementById ( "location-security-job" ) ;
var agentJob = document . getElementById ( "location-agent-job" ) ;
var employeeJob = document . getElementById ( "location-employee-job" ) ;
var employeePartTimeJob = document . getElementById ( "location-parttime-employee-job" ) ;
var waiterJob = document . getElementById ( "location-waiter-job" ) ;
var waiterPartTimeJob = document . getElementById ( "location-parttime-waiter-job" ) ;
2017-02-03 23:05:59 +01:00
var work = document . getElementById ( "location-work" ) ;
var purchase2gb = document . getElementById ( "location-purchase-2gb" ) ;
var purchase4gb = document . getElementById ( "location-purchase-4gb" ) ;
var purchase8gb = document . getElementById ( "location-purchase-8gb" ) ;
var purchase16gb = document . getElementById ( "location-purchase-16gb" ) ;
var purchase32gb = document . getElementById ( "location-purchase-32gb" ) ;
var purchase64gb = document . getElementById ( "location-purchase-64gb" ) ;
var purchase128gb = document . getElementById ( "location-purchase-128gb" ) ;
var purchase256gb = document . getElementById ( "location-purchase-256gb" ) ;
var purchase512gb = document . getElementById ( "location-purchase-512gb" ) ;
var purchase1tb = document . getElementById ( "location-purchase-1tb" ) ;
2017-04-13 22:21:03 +02:00
var purchaseTor = document . getElementById ( "location-purchase-tor" ) ;
2017-04-26 00:24:08 +02:00
var purchaseHomeRam = document . getElementById ( "location-purchase-home-ram" ) ;
2017-10-10 06:56:48 +02:00
var purchaseHomeCores = document . getElementById ( "location-purchase-home-cores" ) ;
2017-02-03 23:05:59 +01:00
var travelToAevum = document . getElementById ( "location-travel-to-aevum" ) ;
var travelToChongqing = document . getElementById ( "location-travel-to-chongqing" ) ;
var travelToSector12 = document . getElementById ( "location-travel-to-sector12" ) ;
var travelToNewTokyo = document . getElementById ( "location-travel-to-newtokyo" ) ;
var travelToIshima = document . getElementById ( "location-travel-to-ishima" ) ;
var travelToVolhaven = document . getElementById ( "location-travel-to-volhaven" ) ;
2017-07-28 16:19:28 +02:00
2017-05-03 19:52:54 +02:00
var slumsShoplift = document . getElementById ( "location-slums-shoplift" ) ;
2017-08-01 21:03:45 +02:00
var slumsRobStore = document . getElementById ( "location-slums-rob-store" ) ;
2017-05-03 19:52:54 +02:00
var slumsMug = document . getElementById ( "location-slums-mug" ) ;
2017-08-01 21:03:45 +02:00
var slumsLarceny = document . getElementById ( "location-slums-larceny" ) ;
2017-05-03 19:52:54 +02:00
var slumsDealDrugs = document . getElementById ( "location-slums-deal-drugs" ) ;
2017-10-12 04:00:22 +02:00
var slumsBondForgery = document . getElementById ( "location-slums-bond-forgery" ) ;
2017-05-03 19:52:54 +02:00
var slumsTrafficArms = document . getElementById ( "location-slums-traffic-arms" ) ;
var slumsHomicide = document . getElementById ( "location-slums-homicide" ) ;
2017-05-08 18:00:34 +02:00
var slumsGta = document . getElementById ( "location-slums-gta" ) ;
2017-05-03 19:52:54 +02:00
var slumsKidnap = document . getElementById ( "location-slums-kidnap" ) ;
2017-05-08 18:00:34 +02:00
var slumsAssassinate = document . getElementById ( "location-slums-assassinate" ) ;
var slumsHeist = document . getElementById ( "location-slums-heist" ) ;
2017-07-28 16:19:28 +02:00
2017-12-02 04:50:08 +01:00
var cityHallCreateCorporation = document . getElementById ( "location-cityhall-create-corporation" ) ;
2018-05-02 19:38:11 +02:00
var nsaBladeburner = document . getElementById ( "location-nsa-bladeburner" ) ;
2017-07-03 21:42:11 +02:00
var hospitalTreatment = document . getElementById ( "location-hospital-treatment" ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
softwareJob . addEventListener ( "click" , function ( ) {
Player . applyForSoftwareJob ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
softwareConsultantJob . addEventListener ( "click" , function ( ) {
Player . applyForSoftwareConsultantJob ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
itJob . addEventListener ( "click" , function ( ) {
2017-05-30 00:37:38 +02:00
Player . applyForItJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
securityEngineerJob . addEventListener ( "click" , function ( ) {
Player . applyForSecurityEngineerJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
networkEngineerJob . addEventListener ( "click" , function ( ) {
Player . applyForNetworkEngineerJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
businessJob . addEventListener ( "click" , function ( ) {
Player . applyForBusinessJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
businessConsultantJob . addEventListener ( "click" , function ( ) {
Player . applyForBusinessConsultantJob ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
securityJob . addEventListener ( "click" , function ( ) {
Player . applyForSecurityJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
agentJob . addEventListener ( "click" , function ( ) {
Player . applyForAgentJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
employeeJob . addEventListener ( "click" , function ( ) {
Player . applyForEmployeeJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
employeePartTimeJob . addEventListener ( "click" , function ( ) {
Player . applyForPartTimeEmployeeJob ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-03 23:05:59 +01:00
waiterJob . addEventListener ( "click" , function ( ) {
Player . applyForWaiterJob ( ) ;
2017-07-28 16:19:28 +02:00
return false ;
2017-02-03 23:05:59 +01:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
waiterPartTimeJob . addEventListener ( "click" , function ( ) {
Player . applyForPartTimeWaiterJob ( ) ;
return false ;
} ) ;
2017-06-11 22:36:36 +02:00
2017-02-06 02:29:17 +01:00
purchase2gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 2 , 2 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase4gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 4 , 4 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase8gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 8 , 8 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase16gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 16 , 16 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase32gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 32 , 32 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase64gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 64 , 64 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase128gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 128 , 128 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase256gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 256 , 256 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase512gb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 512 , 512 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-02-06 02:29:17 +01:00
purchase1tb . addEventListener ( "click" , function ( ) {
2017-05-10 19:42:46 +02:00
purchaseServerBoxCreate ( 1024 , 1024 * CONSTANTS . BaseCostFor1GBOfRamServer ) ;
2017-02-06 02:29:17 +01:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 22:21:03 +02:00
purchaseTor . addEventListener ( "click" , function ( ) {
2017-04-19 21:19:33 +02:00
purchaseTorRouter ( ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-17 14:26:54 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-26 00:24:08 +02:00
purchaseHomeRam . addEventListener ( "click" , function ( ) {
2018-06-07 20:54:34 +02:00
const cost = Player . getUpgradeHomeRamCost ( ) ;
const ram = Player . getHomeComputer ( ) . maxRam ;
2017-08-13 07:01:33 +02:00
var yesBtn = yesNoBoxGetYesButton ( ) , noBtn = yesNoBoxGetNoButton ( ) ;
yesBtn . innerHTML = "Purchase" ; noBtn . innerHTML = "Cancel" ;
yesBtn . addEventListener ( "click" , ( ) => {
purchaseRamForHomeComputer ( cost ) ;
yesNoBoxClose ( ) ;
} ) ;
noBtn . addEventListener ( "click" , ( ) => {
yesNoBoxClose ( ) ;
} ) ;
yesNoBoxCreate ( "Would you like to purchase additional RAM for your home computer? <br><br>" +
2018-06-07 20:54:34 +02:00
"This will upgrade your RAM from " + ram + "GB to " + ram * 2 + "GB. <br><br>" +
"This will cost " + numeral ( cost ) . format ( '$0.000a' ) ) ;
2017-04-26 00:24:08 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-10-10 06:56:48 +02:00
purchaseHomeCores . addEventListener ( "click" , function ( ) {
var currentCores = Player . getHomeComputer ( ) . cpuCores ;
if ( currentCores >= 8 ) { return ; } //Max of 8 cores
//Cost of purchasing another cost is found by indexing this array with number of current cores
var cost = [ 0 ,
10000000000 , //1->2 Cores - 10 bn
250000000000 , //2->3 Cores - 250 bn
5000000000000 , //3->4 Cores - 5 trillion
100000000000000 , //4->5 Cores - 100 trillion
1000000000000000 , //5->6 Cores - 1 quadrillion
20000000000000000 , //6->7 Cores - 20 quadrillion
200000000000000000 ] ; //7->8 Cores - 200 quadrillion
cost = cost [ currentCores ] ;
var yesBtn = yesNoBoxGetYesButton ( ) , noBtn = yesNoBoxGetNoButton ( ) ;
yesBtn . innerHTML = "Purchase" ; noBtn . innerHTML = "Cancel" ;
yesBtn . addEventListener ( "click" , ( ) => {
if ( Player . money . lt ( cost ) ) {
dialogBoxCreate ( "You do not have enough mone to purchase an additional CPU Core for your home computer!" ) ;
} else {
Player . loseMoney ( cost ) ;
Player . getHomeComputer ( ) . cpuCores ++ ;
dialogBoxCreate ( "You purchased an additional CPU Core for your home computer! It now has " +
Player . getHomeComputer ( ) . cpuCores + " cores." ) ;
}
yesNoBoxClose ( ) ;
} ) ;
noBtn . addEventListener ( "click" , ( ) => {
yesNoBoxClose ( ) ;
} ) ;
yesNoBoxCreate ( "Would you like to purchase an additional CPU Core for your home computer? Each CPU Core " +
"lets you start with an additional Core Node in Hacking Missions.<br><br>" +
"Purchasing an additional core (for a total of " + ( Player . getHomeComputer ( ) . cpuCores + 1 ) + ") will " +
"cost " + numeral ( cost ) . format ( '$0.000a' ) ) ;
} ) ;
2017-04-13 19:33:34 +02:00
travelToAevum . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . Aevum , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelToChongqing . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . Chongqing , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelToSector12 . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . Sector12 , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelToNewTokyo . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . NewTokyo , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelToIshima . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . Ishima , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
travelToVolhaven . addEventListener ( "click" , function ( ) {
2018-06-04 03:09:12 +02:00
travelBoxCreate ( Locations . Volhaven , CONSTANTS . TravelCost ) ;
2017-04-13 22:21:03 +02:00
return false ;
2017-04-13 19:33:34 +02:00
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-04 07:05:48 +02:00
slumsShoplift . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Shoplift . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-01 21:03:45 +02:00
slumsRobStore . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . RobStore . commit ( ) ;
2017-08-01 21:03:45 +02:00
return false ;
} ) ;
2017-05-04 07:05:48 +02:00
slumsMug . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Mug . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-08-01 21:03:45 +02:00
slumsLarceny . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Larceny . commit ( ) ;
2017-08-01 21:03:45 +02:00
return false ;
} ) ;
2017-05-04 07:05:48 +02:00
slumsDealDrugs . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . DealDrugs . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-10-12 04:00:22 +02:00
slumsBondForgery . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . BondForgery . commit ( ) ;
2017-10-12 04:00:22 +02:00
return false ;
} ) ;
2017-05-04 07:05:48 +02:00
slumsTrafficArms . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . TraffickArms . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-04 07:05:48 +02:00
slumsHomicide . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Homicide . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-08 18:00:34 +02:00
slumsGta . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . GrandTheftAuto . commit ( ) ;
2017-05-08 18:00:34 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-04 07:05:48 +02:00
slumsKidnap . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Kidnap . commit ( ) ;
2017-05-04 07:05:48 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-08 18:00:34 +02:00
slumsAssassinate . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Assassination . commit ( ) ;
2017-05-08 18:00:34 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-08 18:00:34 +02:00
slumsHeist . addEventListener ( "click" , function ( ) {
2018-05-29 22:36:52 +02:00
Crimes . Heist . commit ( ) ;
2017-05-08 18:00:34 +02:00
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-12-02 04:50:08 +01:00
cityHallCreateCorporation . addEventListener ( "click" , function ( ) {
var yesBtn = yesNoTxtInpBoxGetYesButton ( ) ,
noBtn = yesNoTxtInpBoxGetNoButton ( ) ;
yesBtn . innerText = "Create Corporation" ;
noBtn . innerText = "Cancel" ;
yesBtn . addEventListener ( "click" , function ( ) {
if ( Player . money . lt ( 150e9 ) ) {
dialogBoxCreate ( "You don't have enough money to create a corporation! You need $150b" ) ;
return yesNoTxtInpBoxClose ( ) ;
}
Player . loseMoney ( 150e9 ) ;
var companyName = yesNoTxtInpBoxGetInput ( ) ;
if ( companyName == null || companyName == "" ) {
dialogBoxCreate ( "Invalid company name!" ) ;
return false ;
}
Player . corporation = new Corporation ( {
name : companyName ,
} ) ;
displayLocationContent ( ) ;
2018-07-13 04:22:28 +02:00
document . getElementById ( "corporation-tab" ) . style . display = "list-item" ;
document . getElementById ( "world-menu-header" ) . click ( ) ;
document . getElementById ( "world-menu-header" ) . click ( ) ;
2017-12-02 04:50:08 +01:00
dialogBoxCreate ( "Congratulations! You just started your own corporation. You can visit " +
"and manage your company in the City" ) ;
return yesNoTxtInpBoxClose ( ) ;
} ) ;
noBtn . addEventListener ( "click" , function ( ) {
return yesNoTxtInpBoxClose ( ) ;
} ) ;
if ( Player . corporation instanceof Corporation ) {
return ;
} else {
yesNoTxtInpBoxCreate ( "Would you like to start a corporation? This will require $150b " +
"for registration and initial funding.<br><br>If so, please enter " +
"a name for your corporation below:" ) ;
}
} ) ;
2018-05-02 19:38:11 +02:00
nsaBladeburner . addEventListener ( "click" , function ( ) {
if ( Player . bladeburner && Player . bladeburner instanceof Bladeburner ) {
//Enter Bladeburner division
Engine . loadBladeburnerContent ( ) ;
} else {
//Apply for Bladeburner division
if ( Player . strength >= 100 && Player . defense >= 100 &&
Player . dexterity >= 100 && Player . agility >= 100 ) {
Player . bladeburner = new Bladeburner ( { new : true } ) ;
dialogBoxCreate ( "You have been accepted into the Bladeburner division!" ) ;
displayLocationContent ( ) ;
2018-07-13 04:22:28 +02:00
document . getElementById ( "bladeburner-tab" ) . style . display = "list-item" ;
document . getElementById ( "world-menu-header" ) . click ( ) ;
document . getElementById ( "world-menu-header" ) . click ( ) ;
2018-05-02 19:38:11 +02:00
} else {
dialogBoxCreate ( "Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)" ) ;
}
}
} ) ;
2017-07-03 21:42:11 +02:00
hospitalTreatment . addEventListener ( "click" , function ( ) {
if ( Player . hp < 0 ) { Player . hp = 0 ; }
var price = ( Player . max _hp - Player . hp ) * CONSTANTS . HospitalCostPerHp ;
Player . loseMoney ( price ) ;
2017-07-28 16:19:28 +02:00
dialogBoxCreate ( "You were healed to full health! The hospital billed " +
2017-07-03 21:42:11 +02:00
"you for $" + formatNumber ( price , 2 ) . toString ( ) ) ;
Player . hp = Player . max _hp ;
displayLocationContent ( ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
}
2017-04-13 19:33:34 +02:00
2017-08-30 19:44:29 +02:00
function travelToCity ( destCityName , cost ) {
2017-09-01 22:35:14 +02:00
if ( Player . firstTimeTraveled === false ) {
Player . firstTimeTraveled = true ;
document . getElementById ( "travel-tab" ) . style . display = "list-item" ;
2017-09-03 19:44:20 +02:00
document . getElementById ( "world-menu-header" ) . click ( ) ;
document . getElementById ( "world-menu-header" ) . click ( ) ;
2017-09-01 22:35:14 +02:00
}
2017-07-29 18:25:40 +02:00
if ( Player . money . lt ( cost ) ) {
2017-07-28 16:19:28 +02:00
dialogBoxCreate ( "You cannot afford to travel to " + destCityName ) ;
2017-04-13 19:33:34 +02:00
return ;
}
2017-07-29 18:25:40 +02:00
Player . loseMoney ( cost ) ;
2017-07-28 16:19:28 +02:00
2017-04-13 19:33:34 +02:00
Player . city = destCityName ;
dialogBoxCreate ( "You are now in " + destCityName + "!" ) ;
Engine . loadWorldContent ( ) ;
2017-04-13 22:21:03 +02:00
}
2017-08-30 19:44:29 +02:00
function purchaseTorRouter ( ) {
2017-07-29 18:25:40 +02:00
if ( Player . money . lt ( CONSTANTS . TorRouterCost ) ) {
2017-04-13 22:21:03 +02:00
dialogBoxCreate ( "You cannot afford to purchase the Tor router" ) ;
return ;
}
2017-05-05 18:52:48 +02:00
Player . loseMoney ( CONSTANTS . TorRouterCost ) ;
2017-07-28 16:19:28 +02:00
2018-05-06 23:20:00 +02:00
var darkweb = new Server ( {
ip : createRandomIp ( ) , hostname : "darkweb" , organizationName : "" ,
isConnectedTo : false , adminRights : false , purchasedByPlayer : false , maxRam : 1
} ) ;
2017-04-13 22:21:03 +02:00
AddToAllServers ( darkweb ) ;
2017-05-05 17:50:55 +02:00
SpecialServerIps . addIp ( "Darkweb Server" , darkweb . ip ) ;
2017-07-28 16:19:28 +02:00
2018-06-12 20:01:28 +02:00
const purchaseTor = document . getElementById ( "location-purchase-tor" ) ;
purchaseTor . setAttribute ( "class" , "a-link-button-bought" ) ;
2018-06-14 21:51:06 +02:00
purchaseTor . innerHTML = "TOR Router - Purchased" ;
2017-07-28 16:19:28 +02:00
2017-04-13 22:21:03 +02:00
Player . getHomeComputer ( ) . serversOnNetwork . push ( darkweb . ip ) ;
2017-05-06 21:12:45 +02:00
darkweb . serversOnNetwork . push ( Player . getHomeComputer ( ) . ip ) ;
2018-06-12 20:01:28 +02:00
dialogBoxCreate ( "You have purchased a Tor router!<br>You now have access to the dark web from your home computer<br>Use the scan/scan-analyze commands to search for the dark web connection." ) ;
2017-04-24 21:10:35 +02:00
}
2017-08-30 19:44:29 +02:00
function displayUniversityLocationContent ( costMult ) {
2017-04-24 21:10:35 +02:00
var studyComputerScienceButton = document . getElementById ( "location-study-computer-science" ) ;
var classDataStructuresButton = document . getElementById ( "location-data-structures-class" ) ;
var classNetworksButton = document . getElementById ( "location-networks-class" ) ;
var classAlgorithmsButton = document . getElementById ( "location-algorithms-class" ) ;
2017-04-25 21:14:01 +02:00
var classManagementButton = document . getElementById ( "location-management-class" ) ;
var classLeadershipButton = document . getElementById ( "location-leadership-class" ) ;
2017-04-24 21:10:35 +02:00
studyComputerScienceButton . style . display = "block" ;
classDataStructuresButton . style . display = "block" ;
classNetworksButton . style . display = "block" ;
classAlgorithmsButton . style . display = "block" ;
2017-04-25 21:14:01 +02:00
classManagementButton . style . display = "block" ;
classLeadershipButton . style . display = "block" ;
2017-07-28 16:19:28 +02:00
//Costs (per second)
2017-05-08 16:33:26 +02:00
var dataStructuresCost = CONSTANTS . ClassDataStructuresBaseCost * costMult ;
var networksCost = CONSTANTS . ClassNetworksBaseCost * costMult ;
var algorithmsCost = CONSTANTS . ClassAlgorithmsBaseCost * costMult ;
var managementCost = CONSTANTS . ClassManagementBaseCost * costMult ;
var leadershipCost = CONSTANTS . ClassLeadershipBaseCost * costMult ;
2017-07-28 16:19:28 +02:00
2017-04-24 21:10:35 +02:00
//Update button text to show cost
2017-04-25 21:14:01 +02:00
classDataStructuresButton . innerHTML = "Take Data Structures course ($" + dataStructuresCost + " / sec)" ;
2017-05-10 19:42:46 +02:00
classNetworksButton . innerHTML = "Take Networks course ($" + networksCost + " / sec)" ;
classAlgorithmsButton . innerHTML = "Take Algorithms course ($" + algorithmsCost + " / sec)" ;
classManagementButton . innerHTML = "Take Management course ($" + managementCost + " / sec)" ;
classLeadershipButton . innerHTML = "Take Leadership course ($" + leadershipCost + " / sec)" ;
2017-04-25 21:14:01 +02:00
}
2017-08-30 19:44:29 +02:00
function setUniversityLocationButtons ( costMult , expMult ) {
2017-05-10 19:42:46 +02:00
var newStudyCS = clearEventListeners ( "location-study-computer-science" ) ;
2017-04-25 21:14:01 +02:00
newStudyCS . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassStudyComputerScience ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var newClassDataStructures = clearEventListeners ( "location-data-structures-class" ) ;
2017-04-25 21:14:01 +02:00
newClassDataStructures . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassDataStructures ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var newClassNetworks = clearEventListeners ( "location-networks-class" ) ;
2017-04-25 21:14:01 +02:00
newClassNetworks . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassNetworks ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var newClassAlgorithms = clearEventListeners ( "location-algorithms-class" ) ;
2017-04-25 21:14:01 +02:00
newClassAlgorithms . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassAlgorithms ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var newClassManagement = clearEventListeners ( "location-management-class" ) ;
2017-04-25 21:14:01 +02:00
newClassManagement . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassManagement ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var newClassLeadership = clearEventListeners ( "location-leadership-class" ) ;
2017-04-25 21:14:01 +02:00
newClassLeadership . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassLeadership ) ;
return false ;
} ) ;
}
2017-08-30 19:44:29 +02:00
function displayGymLocationContent ( costMult ) {
2017-05-10 19:42:46 +02:00
var gymStrButton = document . getElementById ( "location-gym-train-str" ) ;
var gymDefButton = document . getElementById ( "location-gym-train-def" ) ;
var gymDexButton = document . getElementById ( "location-gym-train-dex" ) ;
var gymAgiButton = document . getElementById ( "location-gym-train-agi" ) ;
gymStrButton . style . display = "block" ;
gymDefButton . style . display = "block" ;
gymDexButton . style . display = "block" ;
gymAgiButton . style . display = "block" ;
2017-07-28 16:19:28 +02:00
//Costs (per second)
2017-05-10 19:42:46 +02:00
var cost = CONSTANTS . ClassGymBaseCost * costMult ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
//Update button text to show cost
gymStrButton . innerHTML = "Train Strength ($" + cost + " / sec)" ;
gymDefButton . innerHTML = "Train Defense ($" + cost + " / sec)" ;
gymDexButton . innerHTML = "Train Dexterity ($" + cost + " / sec)" ;
gymAgiButton . innerHTML = "Train Agility ($" + cost + " / sec)" ;
}
2017-08-30 19:44:29 +02:00
function setGymLocationButtons ( costMult , expMult ) {
2017-05-10 19:42:46 +02:00
var gymStr = clearEventListeners ( "location-gym-train-str" ) ;
gymStr . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassGymStrength ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var gymDef = clearEventListeners ( "location-gym-train-def" ) ;
gymDef . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassGymDefense ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var gymDex = clearEventListeners ( "location-gym-train-dex" ) ;
gymDex . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassGymDexterity ) ;
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
2017-05-10 19:42:46 +02:00
var gymAgi = clearEventListeners ( "location-gym-train-agi" ) ;
gymAgi . addEventListener ( "click" , function ( ) {
Player . startClass ( costMult , expMult , CONSTANTS . ClassGymAgility ) ;
return false ;
} ) ;
}
2017-07-03 21:42:11 +02:00
2017-08-30 19:44:29 +02:00
function setInfiltrateButton ( btn , companyName , startLevel , val , maxClearance , difficulty ) {
2017-07-03 21:42:11 +02:00
btn . style . display = "block" ;
btn . addEventListener ( "click" , function ( ) {
Engine . loadInfiltrationContent ( ) ;
beginInfiltration ( companyName , startLevel , val , maxClearance , difficulty )
return false ;
} ) ;
2017-07-28 16:19:28 +02:00
}
//Finds the next target job for the player at the given company (loc) and
//adds the tooltiptext to the Application button, given by 'button'
function setJobRequirementTooltip ( loc , entryPosType , btn ) {
var company = Companies [ loc ] ;
if ( company == null ) { return ; }
var pos = Player . getNextCompanyPosition ( company , entryPosType ) ;
if ( pos == null ) { return } ;
2017-08-13 07:01:33 +02:00
if ( ! company . hasPosition ( pos ) ) { return ; }
2017-07-28 16:19:28 +02:00
var reqText = getJobRequirementText ( company , pos , true ) ;
btn . innerHTML += "<span class='tooltiptext'>" + reqText + "</span>" ;
}
2017-08-13 07:01:33 +02:00
function travelBoxCreate ( destCityName , cost ) {
2018-06-13 09:37:21 +02:00
if ( Settings . SuppressTravelConfirmation ) {
travelToCity ( destCityName , cost ) ;
return ;
}
2017-08-13 07:01:33 +02:00
var yesBtn = yesNoBoxGetYesButton ( ) , noBtn = yesNoBoxGetNoButton ( ) ;
yesBtn . innerHTML = "Yes" ;
noBtn . innerHTML = "No" ;
noBtn . addEventListener ( "click" , ( ) => {
yesNoBoxClose ( ) ;
return false ;
} ) ;
yesBtn . addEventListener ( "click" , ( ) => {
yesNoBoxClose ( ) ;
travelToCity ( destCityName , cost ) ;
return false ;
} ) ;
yesNoBoxCreate ( "Would you like to travel to " + destCityName + "? The trip will cost $" + formatNumber ( cost , 2 ) + "." ) ;
}
2017-08-15 22:22:46 +02:00
function purchaseServerBoxCreate ( ram , cost ) {
var yesBtn = yesNoTxtInpBoxGetYesButton ( ) ;
var noBtn = yesNoTxtInpBoxGetNoButton ( ) ;
yesBtn . innerHTML = "Purchase Server" ;
noBtn . innerHTML = "Cancel" ;
yesBtn . addEventListener ( "click" , function ( ) {
purchaseServer ( ram , cost ) ;
yesNoTxtInpBoxClose ( ) ;
} ) ;
noBtn . addEventListener ( "click" , function ( ) {
yesNoTxtInpBoxClose ( ) ;
} ) ;
yesNoTxtInpBoxCreate ( "Would you like to purchase a new server with " + ram +
"GB of RAM for $" + formatNumber ( cost , 2 ) + "?<br><br>" +
"Please enter the server hostname below:<br>" ) ;
}
2017-08-30 19:44:29 +02:00
export { Locations , displayLocationContent , initLocationButtons } ;