Renamed PurchaseServers.js to ServerPurchases.js (more generic file).

This commit is contained in:
Daniel Xie 2017-04-25 15:18:00 -05:00
parent 9d5694e7b5
commit 25b5016fda
5 changed files with 22 additions and 11 deletions

@ -44,7 +44,7 @@
<script src="src/Company.js"></script>
<script src="src/CompanyJobApplication.js"></script>
<script src="src/Terminal.js"></script>
<script src="src/PurchaseServers.js"></script>
<script src="src/ServerPurchases.js"></script>
<script src="src/CreateProgram.js"></script>
<script src="src/Augmentations.js"></script>
<script src="src/Perk.js"></script>
@ -487,6 +487,7 @@
<a href="#" id="location-purchase-512gb" class="a-link-button"> Purchase 512GB Server - $250,000,000</a>
<a href="#" id="location-purchase-1tb" class="a-link-button"> Purchase 1TB Server - $750,000,000</a>
<a href="#" id="location-purchase-tor" class="a-link-button"> Purchase TOR Router - $2,000,000</a>
<a href="#" id="location-purchase-home-ram" class="a-link-button"> Purchase RAM for Home computer </a>
<!-- Travel agency -->
<p id="location-travel-agency-text">

@ -204,7 +204,7 @@ CompanyPositions = {
//Software
SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 0, 0, 0, 0, 0, 0, 1),
JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 0, 0, 0, 0, 1, 9000, 5),
JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 0, 0, 0, 0, 0, 9000, 5),
SeniorDev: new CompanyPosition("Senior Software Engineer", 250, 0, 0, 0, 0, 50, 36000, 12),
LeadDev: new CompanyPosition("Lead Software Developer", 400, 0, 0, 0, 0, 150, 144000, 15),

@ -126,6 +126,7 @@ displayLocationContent = function() {
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");
var travelAgencyText = document.getElementById("location-travel-agency-text");
var travelToAevum = document.getElementById("location-travel-to-aevum");
@ -192,6 +193,7 @@ displayLocationContent = function() {
purchase512gb.style.display = "none";
purchase1tb.style.display = "none";
purchaseTor.style.display = "none";
purchaseHomeRam.stlye.display = "none";
travelAgencyText.style.display = "none";
travelToAevum.style.display = "none";

@ -327,7 +327,7 @@ initForeignServers = function() {
AddToAllServers(RhoConstructionServer);
var AlphaEnterprisesServer = new Server();
AlphaEnterprisesServer.init(createRandomIp(), "alpha-ent", "Alpha Enterprises", true, false, false, false, 8);
AlphaEnterprisesServer.init(createRandomIp(), "alpha-ent", "Alpha Enterprises", true, false, false, false, 0);
AlphaEnterprisesServer.setHackingParameters(550, 800000000, 60, 55);
AlphaEnterprisesServer.setPortProperties(4);
AddToAllServers(AlphaEnterprisesServer);
@ -382,7 +382,7 @@ initForeignServers = function() {
AddToAllServers(CompuTekServer);
var NetLinkTechnologiesServer = new Server();
NetLinkTechnologiesServer.init(createRandomIp(), "netlink", "NetLink Technologies", true, false, false, false, 8);
NetLinkTechnologiesServer.init(createRandomIp(), "netlink", "NetLink Technologies", true, false, false, false, 0);
NetLinkTechnologiesServer.setHackingParameters(400, 350000000, 70, 60);
NetLinkTechnologiesServer.setPortProperties(3);
AddToAllServers(NetLinkTechnologiesServer);
@ -413,7 +413,7 @@ initForeignServers = function() {
AddToAllServers(JoesGunsServer);
var Zer0NightclubServer = new Server();
Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 4);
Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 2);
Zer0NightclubServer.setHackingParameters(75, 750000, 25, 40);
Zer0NightclubServer.setPortProperties(1);
AddToAllServers(Zer0NightclubServer);
@ -449,7 +449,7 @@ initForeignServers = function() {
AddToAllServers(HaraKiriSushiBarServer);
var PhantasyServer = new Server();
PhantasyServer.init(createRandomIp(), "phantasy", "Phantasy Club", true, false, false, false, 1);
PhantasyServer.init(createRandomIp(), "phantasy", "Phantasy Club", true, false, false, false, 4);
PhantasyServer.setHackingParameters(100, 300000, 20, 35);
PhantasyServer.setPortProperties(2);
AddToAllServers(PhantasyServer);
@ -499,22 +499,22 @@ initForeignServers = function() {
//Faction servers, cannot hack money from these
var BitRunnersServer = new Server();
BitRunnersServer.init(createRandomIp(), "run4theh111z", "The Runners", true, false, false, false, 1);
BitRunnersServer.init(createRandomIp(), "run4theh111z", "The Runners", true, false, false, false, 0);
BitRunnersServer.setPortProperties(4);
AddToAllServers(BitRunnersServer);
var NiteSecServer = new Server();
NiteSecServer.init(createRandomIp(), "avmnite-02h", "NiteSec", true, false, false, false, 1);
NiteSecServer.init(createRandomIp(), "avmnite-02h", "NiteSec", true, false, false, false, 0);
NiteSecServer.setPortProperties(2);
AddToAllServers(NiteSecServer);
var DarkArmyServer = new Server();
DarkArmyServer.init(createRandomIp(), ".", ".", true, false, false, false, 1);
DarkArmyServer.init(createRandomIp(), ".", ".", true, false, false, false, 0);
DarkArmyServer.setPortProperties(5);
AddToAllServers(DarkArmyServer);
var CyberSecServer = new Server();
CyberSecServer.init(createRandomIp(), "CSEC", "CyberSec", true, false, false, false, 1);
CyberSecServer.init(createRandomIp(), "CSEC", "CyberSec", true, false, false, false, 0);
CyberSecServer.setPortProperties(2);
AddToAllServers(CyberSecServer);

@ -1,4 +1,7 @@
/* Functions to handle Purchase of Servers */
/* Functions to handle any server-related purchasing:
* Purchasing new servers
* Purchasing more RAM for home computer
*/
purchaseServer = function(ram, cost) {
//Check if player has enough money
if (cost > Player.money) {
@ -28,4 +31,9 @@ purchaseServer = function(ram, cost) {
Player.money -= cost;
dialogBoxCreate("Server successfully purchased with hostname " + hostname);
}
purchaseRamForHomeComputer = function() {
}