v1.0.2 part 1

This commit is contained in:
Olivier Gagnon
2021-11-19 14:39:38 -05:00
parent 762b5b44aa
commit a4a931dad7
4 changed files with 12 additions and 54 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ export function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript
checkTixApiAccess("buy");
const stock = getStockFromSymbol(symbol, "buy");
const res = buyStock(stock, shares, workerScript, {});
return res ? stock.price : 0;
return res ? stock.getAskPrice() : 0;
},
sell: function (symbol: any, shares: any): any {
helper.updateDynamicRam("sell", getRamCost("stock", "sell"));
@@ -135,7 +135,7 @@ export function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript
const stock = getStockFromSymbol(symbol, "sell");
const res = sellStock(stock, shares, workerScript, {});
return res ? stock.price : 0;
return res ? stock.getBidPrice() : 0;
},
short: function (symbol: any, shares: any): any {
helper.updateDynamicRam("short", getRamCost("stock", "short"));