From b4836e532988c7d1133bb0b9ae6b2bb656c77eb2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 30 Jul 2023 22:08:36 -0400 Subject: [PATCH] v2.4.0 --- README.md | 2 +- changelog.md | 0 doc/CONTRIBUTING.md | 8 +- package.json | 6 +- src/Constants.ts | 71 ++++++------ src/Documentation/ui/doc/changelog.md | 101 +++++++++++++----- .../ui/doc/programming/game_frozen.md | 2 +- src/NetscriptFunctions/Singularity.ts | 6 -- test/jest/Terminal/Path.test.ts | 2 - 9 files changed, 120 insertions(+), 78 deletions(-) create mode 100644 changelog.md diff --git a/README.md b/README.md index a8eaf9b4e..fbe877a2f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game) that revolves around hacking and cyberpunk themes. -The game can be played at https://danielyxie.github.io/bitburner/ (release build), https://bitburner-official.github.io/bitburner-src/ (development build), or installed through [Steam](https://store.steampowered.com/app/1812820/Bitburner/). +The game can be played at https://bitburner-official.github.io/ (release build), https://bitburner-official.github.io/bitburner-src/ (development build), or installed through [Steam](https://store.steampowered.com/app/1812820/Bitburner/). The location of the release build may change in the near future. See the [frequently asked questions](./doc/FAQ.md) for more information . To discuss the game or get help, join the [official Discord server](https://discord.gg/TFc3hKD). diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000..e69de29bb diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 24810c982..b5aa2d7d2 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -60,12 +60,8 @@ called `npm` is installed as well. Not all code contributions will be accepted. The safest way to ensure that you don't waste time working on something that gets rejected is to -run your idea(s)/plan(s) past [danielyxie](https://github.com/danielyxie) first. -You can contact him through: - -- Github -- Discord -- [Reddit](https://www.reddit.com/user/chapt3r/) +run your idea(s)/plan(s) past the developpers first. +You can contact him through Discord. Otherwise, here are some general guidelines for determining what types of changes are okay to contribute: diff --git a/package.json b/package.json index c811b2fb0..816443892 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bitburner", "license": "SEE LICENSE IN license.txt", - "version": "2.3.2dev", + "version": "2.4.0dev", "main": "electron-main.js", "author": { "name": "Daniel Xie, Olivier Gagnon, et al." @@ -102,10 +102,10 @@ "engines": { "node": ">=14" }, - "homepage": "https://github.com/danielyxie/bitburner", + "homepage": "https://bitburner-official.github.io/", "repository": { "type": "git", - "url": "git+https://github.com/danielyxie/bitburner.git" + "url": "git+https://github.com/bitburner-official/bitburner-src.git" }, "scripts": { "doc": "npx api-extractor run && npx api-documenter markdown && rm input/bitburner.api.json && rm -r input && git add markdown/ && git add tsdoc-metadata.json", diff --git a/src/Constants.ts b/src/Constants.ts index e504da852..2adccb408 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -88,9 +88,9 @@ export const CONSTANTS: { Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG LatestUpdate: string; } = { - VersionString: "2.3.2", + VersionString: "2.4.0", isDevBranch: true, - VersionNumber: 32, + VersionNumber: 33, /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then @@ -227,42 +227,53 @@ export const CONSTANTS: { InfiniteLoopLimit: 2000, - Donations: 79, + Donations: 113, // Also update doc/source/changelog.rst LatestUpdate: ` -v2.3.2 dev - Changelog updated 7/12/2023 ----------------------------------------- +## v2.4.0 - Death to readthedocs -Also see 2.3.1 release notes: https://github.com/bitburner-official/bitburner-src/releases/tag/v2.3.1 +NETSCRIPT: -GENERAL / MISC: +- Added ns.getFunctionRamCost +- Added run and install identifier -* Added documentation browser ingame. This is the new primary location for game documentation. (@hydroflame) -* Syntax errors now show helpful details at script editor / terminal (@bezrodnov) -* A script's ram will no longer free up twice if it was killed during its own atExit (@d0sboots) -* Ram calculation should now be able to handle barrel files and renamed exports. (@G4mingJon4s) -* ns.printRaw and ns.tprintRaw are now documented functions. (@Snarling) -* "Back" button from faction augs leads to previous page, instead of always to main faction screen (@bezrodnov) -* Addressed an issue where money hacked was being Math.floored incorrectly (@MeggalBozale) -* Aliases that reference their own name stop expanding after first replacement. (@NilsRamstoeck) -* Hitting enter at the terminal with nothing typed in will print out an empty line (@rqzcho) -* Fixed a bug where dragging a tail window titlebar could also scroll the tail window content (@bezrodnov) -* Show more info in the savegame comparison tool (@bezrodnov) -* Fixed Script Editor indent option having backwards behavior. (@Snarling) -* Internal code refactors (@bezrodnov, @Snarling) -* Documentation fixes (@tdnzr, @amuck-gorilla, @rodneygauna, @hydroflame, @Snarling) -* Nerf noodle bar +CORP: -SPOILER SECTIONS: +- Add product investment info to API +- Prevent issues with invalid materials in warehouse +- Update exportMaterial amount to number | string +- Validate city with office for starting product development ------------- +DOCUMENTATION: -CORPORATION: +- readthedoc.bitburner.whatever has been fully deprecated. + That documentation is now available in-game. This will make + documentation easier to maintain and easier to keep locked + with the specific version of the game you're playing. + It's also in .md, which is more common than .rst +- Add printRaw and tprintRaw docs +- Better docs for ascension result +- Complete the spec for hamming codes enhancement +- Fix example code for scp -* ns.corporation.hireEmployee now actually defaults to Unassigned instead of failing. (@Snarling) -* ns.corporation.getProduct now provides investment amounts (@Snarling) -* Invalid materials for a division can no longer be bought through the API. (@Snarling) -* Fixed a React error that could occur if a division had invalid materials. (@Snarling) -`, +MISC. + +- Fixed a bug where RAM calculation would be innacurate for near copy of scripts on different servers +- Fix mislead error message about ram miscalculation when script contains syntax errors. +- Fix bug in calculating faction donation amount +- Fix bug where Sleeve would have difficulty doing certain University activities. +- Fix regression for crime in progress +- Prevent log scrolling on Active Script window drag +- show all skills in import save comparison tool +- Fix extremely minor calculation error where money drained after hack was being floor() +- Fix ram evaluation to include more edge-cases +- Fix potential double-free in atExit() + +CODEBASE: + +- Work on Enum Helper + Reorganise +- enforce eslint react checks +- corp code style improvement +- Added a lot of typesafety`, }; diff --git a/src/Documentation/ui/doc/changelog.md b/src/Documentation/ui/doc/changelog.md index c0b4179dc..4a721f479 100644 --- a/src/Documentation/ui/doc/changelog.md +++ b/src/Documentation/ui/doc/changelog.md @@ -1,7 +1,51 @@ -.. \_changelog: - # Changelog +## v2.4.0 - Death to readthedocs + +NETSCRIPT: + +- Added ns.getFunctionRamCost +- Added run and install identifier + +CORP: + +- Add product investment info to API +- Prevent issues with invalid materials in warehouse +- Update exportMaterial amount to `number | string` +- Validate city with office for starting product development + +DOCUMENTATION: + +- readthedoc.bitburner.whatever has been fully deprecated. + That documentation is now available in-game. This will make + documentation easier to maintain and easier to keep locked + with the specific version of the game you're playing. + It's also in `.md`, which is more common than `.rst` +- Add `printRaw` and `tprintRaw` docs +- Better docs for `ascension` result +- Complete the spec for hamming codes enhancement +- Fix example code for `scp` + +MISC. + +- Fixed a bug where RAM calculation would be innacurate for near copy of scripts on different servers +- Fix mislead error message about ram miscalculation when script contains syntax errors. +- Fix bug in calculating faction donation amount +- Fix bug where Sleeve would have difficulty doing certain University activities. +- Fix regression for crime in progress +- Prevent log scrolling on Active Script window drag +- show all skills in import save comparison tool +- Fix extremely minor calculation error where money drained after hack was being floor() +- Fix ram evaluation to include more edge-cases +- Fix potential double-free in atExit() + +CODEBASE: + +- Work on Enum Helper + Reorganise +- enforce eslint react checks +- corp code style improvement +- Added a lot of typesafety + ## v2.3.1 - Bugfixes 7 June 2023 NETSCRIPT: @@ -457,8 +501,8 @@ API - Corp functions now return copy of constant arrays instead of the original (by @Mughur) - All the player sub-objects need to be copied for `getPlayer`. (by @MageKing17) - add corp get functions, UI (by @Mughur) -- [danielyxie/bitburner#3860] destroyW0r1dD43m0n now properly gives achievements -- [danielyxie/bitburner#3890] favor now properly syncs across pages and the Donate achievement is now given correctly (by @Aerophia) +- destroyW0r1dD43m0n now properly gives achievements +- favor now properly syncs across pages and the Donate achievement is now given correctly (by @Aerophia) - getCrimeStats use bitnode multipliers in the output of crime stats (by @phyzical) - add singularity function for exporting game save back (by @phyzical) @@ -466,11 +510,11 @@ CODING CONTRACTS - inconsistent probability for generation between online and offline (by @quacksouls) - Don't stringify answer if already a string (by @alainbryden) -- [danielyxie/bitburner#3755] change input handling for contract attempts (by @Snarling) +- change input handling for contract attempts (by @Snarling) CORPORATION -- [danielyxie/bitburner#3880], [danielyxie/bitburner#3876], [danielyxie/bitburner#3322], [danielyxie/bitburner#3138] Bunch of corporation fixes (by @Mughur) +- Bunch of corporation fixes (by @Mughur) - Gave investors some economics classes (by @Mughur) - Limit shareholder priority on newly issued shares (by @Undeemiss) - dont take research points for something already researched via api (by @phyzical) @@ -478,14 +522,14 @@ CORPORATION CORPORATION API - Fix up param order for limitProductProduction to match docs (by @phyzical) -- [danielyxie/bitburner#3655] Expose exports from Material (by @Rasmoh) +- Expose exports from Material (by @Rasmoh) DOCUMENTATION - update docs a bit more, amending some BN and SF texts (by @Mughur) - Fixed Argument order for scp() (by @njalooo) - Some typo fixes in Netscript functions (by @quacksouls) -- [danielyxie/bitburner#4033] Why use Coding Contract API (by @quacksouls) +- Why use Coding Contract API (by @quacksouls) - typo fix in description of Caesar cipher (by @quacksouls) - typo fix in terminal.rst (by @BugiDev) - Update bitburner.sleeve.settobladeburneraction.md (by @borisflagell) @@ -496,32 +540,31 @@ DOCUMENTATION NETSCRIPT - Added functions to resize, move, and close tail windows -- [danielyxie/bitburner#2376] ns.exit now exits immediately (by @Snarling) -- [danielyxie/bitburner#4055] Fix dynamic ram check (by @Snarling) -- [danielyxie/bitburner#4037] ns1 wraps deeper layers correctly. (by @Snarling) -- [danielyxie/bitburner#3963] Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K) +- ns.exit now exits immediately (by @Snarling) +- Fix dynamic ram check (by @Snarling) +- ns1 wraps deeper layers correctly. (by @Snarling) +- Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K) - Typo fixes in CodingContract, Hacknet, Singularity APIs (by @quacksouls) - Fix a typo in doc of Singularity.travelToCity() (by @quacksouls) - Update netscript definition file for scp, write, read, and flags (by @Snarling) - Correct missing ! for boolean coercion in Corporation.createCorporation(). (by @Risenafis) - Normalized Stock API logging (by @Snarling) -- [danielyxie/bitburner#3992] allow null duration in toast ns function (by @RollerKnobster) +- allow null duration in toast ns function (by @RollerKnobster) - Correct missing `!` for boolean coercion in `singularity.workForCompany()`. (by @MageKing17) - ns.scp and ns.write are now synchronous + fix exec race condition (by @Snarling) -- [danielyxie/bitburner#2931] atExit now allows synchronous ns functions (by @Snarling) +- atExit now allows synchronous ns functions (by @Snarling) - Improve real life CPU and memory performance of scripts. (by @Snarling) - Prompt Add user friendly message to avoid throwing recovery screen for invalid choices (by @phyzical) -- [danielyxie/bitburner#4081] Rerunning a script from tail window recalculates ram usage (by @Snarling) -- [danielyxie/bitburner#3962] The correct script will be closed even if the player modifies args (v2.0) (by @Snarling) +- Rerunning a script from tail window recalculates ram usage (by @Snarling) +- The correct script will be closed even if the player modifies args (v2.0) (by @Snarling) - Corrected ns formula for infiltration rewards (by @ezylot) - Add singularity check for finishing company work (by @Snarling) SLEEVES -- [danielyxie/bitburner#3819] Allow using the regeneration chamber with sleeves to heal them. (by @coderanger) -- [danielyxie/bitburner#4063] fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts (by @Snarling) -- [danielyxie/bitburner#4051] Sleeves no longer crash when player quits company sleeve was working (by @Snarling) -- [danielyxie/bitburner#4022], [danielyxie/bitburner#4024], [danielyxie/bitburner#4025], [danielyxie/bitburner#3998] (by @Mughur) +- Allow using the regeneration chamber with sleeves to heal them. (by @coderanger) +- fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts (by @Snarling) +- Sleeves no longer crash when player quits company sleeve was working (by @Snarling) - Sleeve crime gain bitnode multiplier fix (by @Mughur) REMOTE FILE API @@ -531,30 +574,30 @@ REMOTE FILE API UI -- [danielyxie/bitburner#2962] add a setting to display middle time unit in Time Elapsed String (by @hydroflame) -- [danielyxie/bitburner#4106] fix incorrect experience display in Crime UI. (by @SilverNexus) +- add a setting to display middle time unit in Time Elapsed String (by @hydroflame) +- fix incorrect experience display in Crime UI. (by @SilverNexus) - Bitnode stats now show if BB/Corporation are disabled (by @Kelenius) - Removed three empty lines from BB status screen (by @Kelenius) - Add missing space to BN7 description (by @hex7cd) - Improvements to crime work UI (by @Kelenius) -- [danielyxie/bitburner#3975], [danielyxie/bitburner#3882] Script Editor more responsive on resize, and fix dirty file indicator (by @Snarling) +- Script Editor more responsive on resize, and fix dirty file indicator (by @Snarling) MISC - Added weight to GangMemberTask construction call (by @ezylot) - Fix ANSI display bugs (by @Snarling) - Debounce updateRAM calls in script editor. (by @Snarling) -- [danielyxie/bitburner#3979] Allow characters & and ' in filenames (by @Snarling) -- [danielyxie/bitburner#3965] Corrected tutorial text (by @mihilt) +- Allow characters & and ' in filenames (by @Snarling) +- Corrected tutorial text (by @mihilt) - Fix infil definitions.d.ts (by @phyzical) - Modify PR template (by @Hoekstraa) - crime gains, sleeve gang augs and faq (by @Mughur) -- [danielyxie/bitburner#3649] Preventing server starting security level from going above 100 (by @Shiiyu) +- Preventing server starting security level from going above 100 (by @Shiiyu) - Adds Shadows of Anarchy (by @Lagicrus) - Added intormation about hacking managers to hacking algorithms page (by @Kelenius) - Fix Jest CI Error (by @geggleto) - multiple hasAugmentation checks didn't check if the augment was installed (by @Mughur) -- [danielyxie/bitburner#2442] & [danielyxie/bitburner#2795] (by @G4mingJon4s) +- & (by @G4mingJon4s) - Adds info regarding augments and focus (by @Lagicrus) - Removed console.log line (by @dhosborne) - Update some doc (by @hydroflame) @@ -1213,7 +1256,7 @@ Stanek Gift ** Documentation ** - The new documentation for the netscript API is available at - https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md + https://github.com/bitburner-official/bitburner-src/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. @@ -3078,7 +3121,7 @@ Stanek Gift - Added 'var' declarations in Netscript 1.0 (only works with 'var', not 'let' or 'const') - Script base RAM cost is now 1.6 GB (increased from 1.4 GB) - While/for loops and if statements no longer cost RAM in scripts -- Made short-circuit evaluation logic more consistent in Netscript 1.0 (see https://github.com/danielyxie/bitburner/issues/308) +- Made short-circuit evaluation logic more consistent in Netscript 1.0 - Changelog button in the Options menu now links to the new Changelog URL (by Github user thePalindrome) - Skill level calculation is now 'smoother' (by Github user hydroflame) - Added a button to 'beautify' scripts in the text editor (by Github user hydroflame) diff --git a/src/Documentation/ui/doc/programming/game_frozen.md b/src/Documentation/ui/doc/programming/game_frozen.md index 751056ac7..d566fa2e0 100644 --- a/src/Documentation/ui/doc/programming/game_frozen.md +++ b/src/Documentation/ui/doc/programming/game_frozen.md @@ -6,7 +6,7 @@ If your game is frozen or stuck in any way, then the most likely culprit is an infinitely running loop in your script. To get past the freezing, run the game with `?noScripts` in the URL: -[Link to no freeze](https://danielyxie.github.io/bitburner/?noScripts) +[Link to no freeze](https://bitburner-official.github.io?noScripts) Then, to fix your script, make sure you have a `sleep()` or any other timed function like `hack()` or `grow()` in any infinite loops: diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index fc2145026..651d2c834 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -780,12 +780,6 @@ export function NetscriptSingularity(): InternalAPI { helpers.log(ctx, () => `Invalid job: '${field}'.`); return false; } - // TODO https://github.com/danielyxie/bitburner/issues/1378 - // The player object's applyForJob function can return string with special error messages - // if (isString(res)) { - // helpers.log(ctx,"applyToCompany",()=> res); - // return false; - // } if (res) { helpers.log( ctx, diff --git a/test/jest/Terminal/Path.test.ts b/test/jest/Terminal/Path.test.ts index 3e1ea91df..d015c2f69 100644 --- a/test/jest/Terminal/Path.test.ts +++ b/test/jest/Terminal/Path.test.ts @@ -88,8 +88,6 @@ describe("Terminal Directory Tests", function () { expect(isValidDirectory(".a1/")).toBe(true); expect(isValidDirectory("._foo/")).toBe(true); expect(isValidDirectory("_foo/")).toBe(true); - // the changes made to support this broke mv - // see https://github.com/danielyxie/bitburner/pull/3653 if you try to re support expect(isValidDirectory("foo.dir/")).toBe(true); expect(isValidDirectory("foov1.0.0.1/")).toBe(true); expect(isValidDirectory("foov1..0..0..1/")).toBe(true);