Small UI improvements, balancing crime money

This commit is contained in:
Daniel Xie
2017-05-06 14:12:45 -05:00
parent 2e55f1d472
commit 534f5c1dbe
12 changed files with 107 additions and 107 deletions
+8
View File
@@ -56,6 +56,14 @@ function Server() {
//Initialize the properties of a server
Server.prototype.init = function(ip, hostname, organizationName, onlineStatus, isConnectedTo, adminRights, purchasedByPlayer, maxRam) {
this.ip = ip;
//Check if hostname is unique
var i = 0;
while (GetServerByHostname(hostname) != null) {
//Server already exists
hostname = hostname + "-" + i;
++i;
}
this.hostname = hostname;
this.organizationName = organizationName;
this.isOnline = onlineStatus;