From a4a931dad76928767f51fe72b21e3e6aca1f1942 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 19 Nov 2021 14:39:38 -0500 Subject: [PATCH] v1.0.2 part 1 --- src/Constants.ts | 54 ++++------------------ src/NetscriptFunctions/StockMarket.ts | 4 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 7 +-- src/ui/React/GameOptionsRoot.tsx | 1 + 4 files changed, 12 insertions(+), 54 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 64582fa37..c806327d2 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -115,8 +115,8 @@ export const CONSTANTS: { TotalNumBitNodes: number; LatestUpdate: string; } = { - VersionString: "1.0.1", - VersionNumber: 4, + VersionString: "1.0.2", + VersionNumber: 5, // Speed (in ms) at which the main loop is updated _idleSpeed: 200, @@ -283,55 +283,17 @@ export const CONSTANTS: { TotalNumBitNodes: 24, LatestUpdate: ` - v1.0.1 - 2021-11-17 New documentation (hydroflame) - -------------------------------------------------- + v1.0.2 - 2021-11-17 It's the little things (hydroflame) + ------------------------------------------------------- - ** Documentation ** + ** Breaking (very small I promise!) ** - * The new documentation for the netscript API is available at - https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md - This documentation is used in-game to validate the code, in-editor to autocomplete, and - for users to reference. This is a huge quality of life improvements for me. - - ** Reputation ** - - * Fixed favor not affecting faction work reputation gain (Yeah, I know right?) - - ** Hacknet ** - - * Servers are now considerd "purchasedByPlayers" - - ** Script Editor ** - - * solarized themes now work. - - ** Corporation ** - - * Dividends are now much more taxed. - * The 2 upgrades that reduced taxes are now much stronger. + * buy / sell now return getAskPrice / getBidPrice instead of just price. + This should help solve some inconsistencies. ** Misc. ** - * Starting / Stopping scripts on hashnet servers immediately updates their hash rate (instead of on the next tick) - * Hacknet has tooltip showing what the result of the upgrade would be. - * Augmentations page displayes current price multiplier as well as explains the mechanic. - * Terminal now is 25x stronger. - * Tail boxes use pre-wrap for it's lines. - * Tail boxes allow you to rerun dead scripts. - * Tail boxes can no longer open the same one twice. - * Terminal now autocompletes through aliases. - * Make alter reality harder. - * Fix bladeburner cancelling actions when manually starting anything with Simulacrum. - * Buying hash upgrade to increase uni class or gym training will apply to current class. - * Internally the game no longer uses the decimal library. - * Fix an issue where 'download *' would generate weird windows files. - * Timestamps can be set to any format in the options. - * Fix typo in documentation share popup. - * Remove bunch of debug log. - * Fix typo in corporation handbook literature. - * Fix typo in documentation - * Fix duplicate SF -1 exploit. (Yeah, an exploit of exploits, now were meta) - * Fix offline hacking earning being attributed to hacknet. + * documentation for scp not say string | string[] * nerf noodle bar `, }; diff --git a/src/NetscriptFunctions/StockMarket.ts b/src/NetscriptFunctions/StockMarket.ts index adb34fcde..1fc88de61 100644 --- a/src/NetscriptFunctions/StockMarket.ts +++ b/src/NetscriptFunctions/StockMarket.ts @@ -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")); diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index d302bdf50..413c840a4 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4069,12 +4069,7 @@ export interface NS extends Singularity { * @param destination - Host of the destination server, which is the server to which the file will be copied. * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied. */ - scp( - files: string[], - source: string, - // tslint:disable-next-line:unified-signatures - destination: string, - ): Promise; + scp(files: string | string[], source: string, destination: string): Promise; /** * List files on a server. diff --git a/src/ui/React/GameOptionsRoot.tsx b/src/ui/React/GameOptionsRoot.tsx index daeb820df..7e5ee1f74 100644 --- a/src/ui/React/GameOptionsRoot.tsx +++ b/src/ui/React/GameOptionsRoot.tsx @@ -493,6 +493,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement { }} value={timestampFormat} onChange={handleTimestampFormatChange} + placeholder="yyyy-MM-dd hh:mm:ss" />