mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 06:02:26 +01:00
Added the getStockSymbols method to the TIX API, wich returns an array of the tradable symbols
This commit is contained in:
parent
8f4ac830ad
commit
dea7bd79c8
@ -24,6 +24,14 @@ getStockPrice
|
||||
|
||||
getStockPrice("FISG");
|
||||
|
||||
getStockSymbols
|
||||
-------------
|
||||
|
||||
.. js:function:: getStockSymbols()
|
||||
|
||||
Returns an array of the symbols of the tradable stocks.
|
||||
|
||||
|
||||
getStockPosition
|
||||
----------------
|
||||
|
||||
|
@ -92,7 +92,7 @@ let NetscriptFunctions =
|
||||
"installAugmentations|" +
|
||||
|
||||
// TIX API
|
||||
"getStockPrice|getStockPosition|buyStock|sellStock|shortStock|sellShort|" +
|
||||
"getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|shortStock|sellShort|" +
|
||||
"placeOrder|cancelOrder|" +
|
||||
|
||||
// Hacknet Node API
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user