This commit is contained in:
Olivier Gagnon
2021-12-20 15:48:26 -05:00
parent ddd0eaaf5c
commit 41a7109baa
7 changed files with 33 additions and 14 deletions
+3 -1
View File
@@ -1594,7 +1594,9 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
return cost;
},
purchaseServer: function (name: any, ram: any): any {
purchaseServer: function (aname: any, aram: any): any {
const name = helper.string("purchaseServer", "name", aname);
const ram = helper.number("purchaseServer", "ram", aram);
updateDynamicRam("purchaseServer", getRamCost("purchaseServer"));
let hostnameStr = String(name);
hostnameStr = hostnameStr.replace(/\s+/g, "");