mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
NETSCRIPT: Add ns.stock.getConstants (#692)
This commit is contained in:
24
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
24
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -393,6 +393,27 @@ interface StockOrder {
|
||||
[key: string]: StockOrderObject[];
|
||||
}
|
||||
|
||||
/** Constants used for the stockmarket game mechanic.
|
||||
* @public */
|
||||
interface StockMarketConstants {
|
||||
/** Normal time in ms between stock market updates */
|
||||
msPerStockUpdate: number;
|
||||
/** Minimum time in ms between stock market updates if there is stored offline/bonus time */
|
||||
msPerStockUpdateMin: number;
|
||||
/** An internal constant used while determining when to flip a stock's forecast */
|
||||
TicksPerCycle: number;
|
||||
/** Cost of the WSE account */
|
||||
WSEAccountCost: number;
|
||||
/** Cost of the TIX API */
|
||||
TIXAPICost: number;
|
||||
/** Cost of the 4S Market Data */
|
||||
MarketData4SCost: number;
|
||||
/** Cost of the 4S Market Data TIX API integration */
|
||||
MarketDataTixApi4SCost: number;
|
||||
/** Commission fee for transactions */
|
||||
StockMarketCommission: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A single process on a server.
|
||||
* @public
|
||||
@@ -1077,6 +1098,9 @@ export interface NetscriptPort {
|
||||
* @public
|
||||
*/
|
||||
export interface TIX {
|
||||
/** Get game constants for the stock market mechanic.
|
||||
* @remarks RAM cost: 0 GB */
|
||||
getConstants(): StockMarketConstants;
|
||||
/**
|
||||
* Returns true if the player has access to a WSE Account
|
||||
* @remarks RAM cost: 0.05 GB
|
||||
|
||||
Reference in New Issue
Block a user