[feat] Let server RAM be a range instead of static

This commit is contained in:
Steven Evans 2018-09-07 00:37:59 -04:00
parent babbf00029
commit 3d52ed5990
2 changed files with 3 additions and 2 deletions

@ -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) {

@ -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.