mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 21:07:04 +02:00
Small UI improvements, balancing crime money
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user