From 04611a30b607aaad2d671206217367c8034ddd2c Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Wed, 20 Nov 2024 02:47:34 +0700 Subject: [PATCH] MISC: Remove duplicate usages of special server's hostname (#1781) --- src/Server/data/SpecialServers.ts | 17 ++--------------- src/Server/data/servers.ts | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/src/Server/data/SpecialServers.ts b/src/Server/data/SpecialServers.ts index d24520a05..4374ab2cd 100644 --- a/src/Server/data/SpecialServers.ts +++ b/src/Server/data/SpecialServers.ts @@ -1,18 +1,5 @@ /* Holds IP of Special Servers */ -export const SpecialServers: { - [key: string]: string | undefined; - - Home: string; - FulcrumSecretTechnologies: string; - CyberSecServer: string; - NiteSecServer: string; - TheBlackHandServer: string; - BitRunnersServer: string; - TheDarkArmyServer: string; - DaedalusServer: string; - WorldDaemon: string; - DarkWeb: string; -} = { +export const SpecialServers = { Home: "home", FulcrumSecretTechnologies: "fulcrumassets", CyberSecServer: "CSEC", @@ -23,4 +10,4 @@ export const SpecialServers: { DaedalusServer: "The-Cave", WorldDaemon: "w0r1d_d43m0n", DarkWeb: "darkweb", -}; +} as const; diff --git a/src/Server/data/servers.ts b/src/Server/data/servers.ts index 5621c07f3..1830a4ec3 100644 --- a/src/Server/data/servers.ts +++ b/src/Server/data/servers.ts @@ -286,7 +286,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 99, - hostname: "fulcrumassets", + hostname: SpecialServers.FulcrumSecretTechnologies, moneyAvailable: 1e6, networkLayer: 15, numOpenPortsRequired: 5, @@ -1428,7 +1428,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "run4theh111z", + hostname: SpecialServers.BitRunnersServer, literature: [LiteratureName.SimulatedReality, LiteratureName.TheNewGod], maxRamExponent: { max: 9, @@ -1447,7 +1447,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "I.I.I.I", + hostname: SpecialServers.TheBlackHandServer, literature: [LiteratureName.DemocracyIsDead], maxRamExponent: { max: 8, @@ -1456,7 +1456,7 @@ export const serverMetadata: IServerMetadata[] = [ moneyAvailable: 0, networkLayer: 5, numOpenPortsRequired: 3, - organizationName: "I.I.I.I", + organizationName: SpecialServers.TheBlackHandServer, requiredHackingSkill: { max: 365, min: 340, @@ -1466,7 +1466,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "avmnite-02h", + hostname: SpecialServers.NiteSecServer, literature: [LiteratureName.DemocracyIsDead], maxRamExponent: { max: 7, @@ -1485,12 +1485,12 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: ".", + hostname: SpecialServers.TheDarkArmyServer, maxRamExponent: 4, moneyAvailable: 0, networkLayer: 13, numOpenPortsRequired: 4, - organizationName: ".", + organizationName: SpecialServers.TheDarkArmyServer, requiredHackingSkill: { max: 550, min: 505, @@ -1500,7 +1500,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "CSEC", + hostname: SpecialServers.CyberSecServer, literature: [LiteratureName.DemocracyIsDead], maxRamExponent: 3, moneyAvailable: 0, @@ -1516,7 +1516,7 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "The-Cave", + hostname: SpecialServers.DaedalusServer, literature: [LiteratureName.AlphaOmega], moneyAvailable: 0, networkLayer: 15, @@ -1528,10 +1528,10 @@ export const serverMetadata: IServerMetadata[] = [ }, { hackDifficulty: 0, - hostname: "w0r1d_d43m0n", + hostname: SpecialServers.WorldDaemon, moneyAvailable: 0, numOpenPortsRequired: 5, - organizationName: "w0r1d_d43m0n", + organizationName: SpecialServers.WorldDaemon, requiredHackingSkill: 3000, serverGrowth: 0, specialName: SpecialServers.WorldDaemon,