This commit is contained in:
danielyxie
2018-09-29 20:52:38 -05:00
parent dea7bd79c8
commit 2b3c58a17b
8 changed files with 218 additions and 167100 deletions
+10 -7
View File
@@ -1394,6 +1394,16 @@ function NetscriptFunctions(workerScript) {
}
return (findRunningScript(filename, argsForTargetScript, server) != null);
},
getStockSymbols : function(){
if (workerScript.checkingRam) {
return updateStaticRam("getStockSymbols", CONSTANTS.ScriptGetStockRamCost);
}
updateDynamicRam("getStockSymbols", CONSTANTS.ScriptGetStockRamCost);
if (!Player.hasTixApiAccess) {
throw makeRuntimeRejectMsg(workerScript, "You don't have TIX API Access! Cannot use getStockSymbols()");
}
return Object.values(StockSymbols);
},
getStockPrice : function(symbol) {
if (workerScript.checkingRam) {
return updateStaticRam("getStockPrice", CONSTANTS.ScriptGetStockRamCost);
@@ -1668,13 +1678,6 @@ function NetscriptFunctions(workerScript) {
stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;
return forecast / 100; //Convert from percentage to decimal
},
getStockSymbols : function(){
if (workerScript.checkingRam) {
return updateStaticRam("getStockSymbols", CONSTANTS.ScriptGetStockRamCost);
}
updateDynamicRam("getStockSymbols", CONSTANTS.ScriptGetStockRamCost);
return Object.values(StockSymbols);
},
getPurchasedServerLimit : function() {
if (workerScript.checkingRam) {
return updateStaticRam("getPurchasedServerLimit", CONSTANTS.ScriptGetPurchasedServerLimit);