2017-08-30 19:44:29 +02:00
|
|
|
import {Reviver, Generic_toJSON,
|
|
|
|
Generic_fromJSON} from "../utils/JSONReviver.js";
|
|
|
|
|
2017-02-09 23:40:55 +01:00
|
|
|
/* Holds IP of Special Servers */
|
2017-08-30 19:44:29 +02:00
|
|
|
let SpecialServerNames = {
|
2017-06-02 06:15:45 +02:00
|
|
|
FulcrumSecretTechnologies: "Fulcrum Secret Technologies Server",
|
|
|
|
CyberSecServer: "CyberSec Server",
|
|
|
|
NiteSecServer: "NiteSec Server",
|
|
|
|
TheBlackHandServer: "The Black Hand Server",
|
|
|
|
BitRunnersServer: "BitRunners Server",
|
|
|
|
TheDarkArmyServer: "The Dark Army Server",
|
|
|
|
DaedalusServer: "Daedalus Server",
|
|
|
|
WorldDaemon: "w0r1d_d43m0n",
|
2017-02-16 19:52:11 +01:00
|
|
|
}
|
2017-06-02 06:15:45 +02:00
|
|
|
function SpecialServerIpsMap() {}
|
2017-02-16 19:52:11 +01:00
|
|
|
|
|
|
|
SpecialServerIpsMap.prototype.addIp = function(name, ip) {
|
|
|
|
this[name] = ip;
|
|
|
|
}
|
|
|
|
|
|
|
|
SpecialServerIpsMap.prototype.toJSON = function() {
|
|
|
|
return Generic_toJSON("SpecialServerIpsMap", this);
|
|
|
|
}
|
|
|
|
|
|
|
|
SpecialServerIpsMap.fromJSON = function(value) {
|
|
|
|
return Generic_fromJSON(SpecialServerIpsMap, value.data);
|
|
|
|
}
|
|
|
|
|
2017-08-30 19:44:29 +02:00
|
|
|
Reviver.constructors.SpecialServerIpsMap = SpecialServerIpsMap;
|
|
|
|
|
|
|
|
let SpecialServerIps = new SpecialServerIpsMap();
|
|
|
|
|
|
|
|
function prestigeSpecialServerIps() {
|
|
|
|
for (var member in SpecialServerIps) {
|
|
|
|
delete SpecialServerIps[member];
|
|
|
|
}
|
|
|
|
SpecialServerIps = null;
|
|
|
|
SpecialServerIps = new SpecialServerIpsMap();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadSpecialServerIps(saveString) {
|
|
|
|
SpecialServerIps = JSON.parse(saveString, Reviver);
|
|
|
|
}
|
|
|
|
|
|
|
|
function initSpecialServerIps() {
|
|
|
|
SpecialServerIps = new SpecialServerIpsMap();
|
|
|
|
}
|
2017-02-16 19:52:11 +01:00
|
|
|
|
2017-08-30 19:44:29 +02:00
|
|
|
export {SpecialServerNames, SpecialServerIps, SpecialServerIpsMap, loadSpecialServerIps,
|
|
|
|
prestigeSpecialServerIps, initSpecialServerIps};
|