Added the getStockSymbols method to the TIX API, wich returns an array of the tradable symbols

This commit is contained in:
Santiago Kent
2018-09-29 17:19:24 -03:00
committed by danielyxie
parent 8f4ac830ad
commit dea7bd79c8
3 changed files with 16 additions and 1 deletions
+7
View File
@@ -1668,6 +1668,13 @@ 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);