Refactored Server() to take old init args in constructor. Removed Server.init(). Faction reputation is now exponential. Increased infiltration exp gains. DOM now loads before scripts

This commit is contained in:
danielyxie
2017-08-02 23:21:15 -05:00
parent c62639099a
commit 4a99c04772
12 changed files with 269 additions and 293 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ purchaseServer = function(ram, cost) {
return;
}
var newServ = new Server();
var hostname = document.getElementById("purchase-server-box-input").value;
hostname = hostname.replace(/\s\s+/g, '');
if (hostname == "") {
@@ -26,7 +26,7 @@ purchaseServer = function(ram, cost) {
}
//Create server
newServ.init(createRandomIp(), hostname, "", true, false, true, true, ram);
var newServ = new Server(createRandomIp(), hostname, "", false, true, true, ram);
AddToAllServers(newServ);
//Add to Player's purchasedServers array