diff --git a/src/Server.js b/src/Server.js index 3e69551f8..ce007fd54 100644 --- a/src/Server.js +++ b/src/Server.js @@ -160,7 +160,7 @@ function initForeignServers() { }; if (metadata.maxRamExponent !== undefined) { - serverParams.maxRam = Math.pow(2, metadata.maxRamExponent); + serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent)); } for (const prop of propertiesToPatternMatch) { diff --git a/src/data/servers.ts b/src/data/servers.ts index 140564dd6..8da23968c 100644 --- a/src/data/servers.ts +++ b/src/data/servers.ts @@ -41,8 +41,9 @@ interface IServerMetadata { /** * When populated, the exponent of 2^x amount of RAM the server has. + * This should be in the range of 1-20, to match the Player's max RAM. */ - maxRamExponent?: number; + maxRamExponent?: number | IMinMaxRange; /** * How much money the server starts out with.