mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 03:00:56 +02:00
API: Rename "TIX" interface to "Stock" (#2351)
This commit is contained in:
@@ -18,13 +18,13 @@ import {
|
||||
getStockMarketTixApiCost,
|
||||
} from "../StockMarket/StockMarketCosts";
|
||||
import type { Stock } from "../StockMarket/Stock";
|
||||
import type { StockOrder, TIX } from "@nsdefs";
|
||||
import type { StockOrder, Stock as StockAPI } from "@nsdefs";
|
||||
import { setRemovedFunctions, type InternalAPI, type NetscriptContext } from "../Netscript/APIWrapper";
|
||||
import { helpers } from "../Netscript/NetscriptHelpers";
|
||||
import { StockMarketConstants } from "../StockMarket/data/Constants";
|
||||
import { getEnumHelper } from "../utils/EnumHelper";
|
||||
|
||||
export function NetscriptStockMarket(): InternalAPI<TIX> {
|
||||
export function NetscriptStockMarket(): InternalAPI<StockAPI> {
|
||||
/** Checks if the player has TIX API access. Throws an error if the player does not */
|
||||
const checkTixApiAccess = function (ctx: NetscriptContext): void {
|
||||
if (!Player.hasTixApiAccess) {
|
||||
@@ -41,7 +41,7 @@ export function NetscriptStockMarket(): InternalAPI<TIX> {
|
||||
return stock;
|
||||
};
|
||||
|
||||
const stockFunctions: InternalAPI<TIX> = {
|
||||
const stockFunctions: InternalAPI<StockAPI> = {
|
||||
getConstants: () => () => structuredClone(StockMarketConstants),
|
||||
hasWseAccount: () => () => Player.hasWseAccount,
|
||||
hasTixApiAccess: () => () => Player.hasTixApiAccess,
|
||||
|
||||
Reference in New Issue
Block a user