mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 12:45:45 +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");
|
getStockPrice("FISG");
|
||||||
|
|
||||||
|
getStockSymbols
|
||||||
|
-------------
|
||||||
|
|
||||||
|
.. js:function:: getStockSymbols()
|
||||||
|
|
||||||
|
Returns an array of the symbols of the tradable stocks.
|
||||||
|
|
||||||
|
|
||||||
getStockPosition
|
getStockPosition
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ let NetscriptFunctions =
|
|||||||
"installAugmentations|" +
|
"installAugmentations|" +
|
||||||
|
|
||||||
// TIX API
|
// TIX API
|
||||||
"getStockPrice|getStockPosition|buyStock|sellStock|shortStock|sellShort|" +
|
"getStockPrice|getStockPosition|getStockSymbols|buyStock|sellStock|shortStock|sellShort|" +
|
||||||
"placeOrder|cancelOrder|" +
|
"placeOrder|cancelOrder|" +
|
||||||
|
|
||||||
// Hacknet Node API
|
// Hacknet Node API
|
||||||
|
@ -1668,6 +1668,13 @@ function NetscriptFunctions(workerScript) {
|
|||||||
stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;
|
stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;
|
||||||
return forecast / 100; //Convert from percentage to decimal
|
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() {
|
getPurchasedServerLimit : function() {
|
||||||
if (workerScript.checkingRam) {
|
if (workerScript.checkingRam) {
|
||||||
return updateStaticRam("getPurchasedServerLimit", CONSTANTS.ScriptGetPurchasedServerLimit);
|
return updateStaticRam("getPurchasedServerLimit", CONSTANTS.ScriptGetPurchasedServerLimit);
|
||||||
|
Loading…
Reference in New Issue
Block a user