Compare commits

...

98 Commits

Author SHA1 Message Date
Snarling
0bf01aacab RELEASE: 2.6.0 (#1136) 2024-03-05 20:46:46 -05:00
Snarling
69babf02b2 Changelog before 2.6.0 2024-03-05 20:18:22 -05:00
Snarling
d61e12fdd1 API: Minor followup changes for #1059 (#1135) 2024-03-05 19:42:55 -05:00
Shy
4aaf845fca API: make ns.atExit add the callback to an array instead of setting it (#1059) 2024-03-05 19:22:45 -05:00
Snarling
4f4c6fe7e5 Move heart.break out of Extra.ts (#1133) 2024-03-04 18:36:14 -05:00
Snarling
d801743842 Generate missing docs 2024-03-04 09:51:34 -05:00
LJ
a5f5c81912 API: Add karma to ns.getPlayer() & document ns.heart.break() (#1131) 2024-03-04 09:35:54 -05:00
LJ
65082f677e Update rm command help text (#1132) 2024-03-04 09:30:03 -05:00
catloversg
ffc34387f0 CORPORATION: Add documentation (#1121)
This ports the PDF manual by @catloversg into .md form, so it can be used in-game and via browsing on GitHub.

It also adds MathJax rendering to in-game docs, so that the math formulas can be rendered. (GitHub already supports this natively.)
2024-03-04 03:10:18 -08:00
Bart Kuijper
6a3d22d7bd CONTRACTS: createDummyContract returns filename (#1129) 2024-03-01 23:12:04 -05:00
LJ
4c7f192645 UI: Infiltration rewards default to the faction you're currently working for (#1114)
* Better infiltration victory faction default
* Better condition for "none" default
* Fix default faction type.
2024-02-28 16:37:27 -08:00
Yichi Zhang
6288eec6d7 HACKNET: Disallow negative count argument for spendHashes (#1127)
* disallow buying a negative amount of an upgrade
* allow 0 silently
2024-02-27 12:34:36 -08:00
Caldwell
3d6692b292 MISC: clamping numbers (#1104) 2024-02-27 09:47:00 -05:00
Snarling
153dbfff12 Changelog + doc update 2024-02-26 09:51:48 -05:00
hydroflame
483d554fc2 MISC: Update donation counter (#1118) 2024-02-26 09:42:31 -05:00
Snarling
91105c6d8c TESTS: Prevent some test spam (#1126) 2024-02-26 08:22:33 -05:00
Snarling
373ced2efe GO: Various changes before 2.6.0 (#1120) 2024-02-26 08:05:10 -05:00
LJ
f6871f0911 GANG: Clarify install behavior & add getInstallResult() (#1119)
New function returns post-install ascension ratios.

* Add ascension penalty to Gang constants
* Improve wording of Gang install message
* Add GangMember#getInstallResults()
* Update prestiging to use getInstallResults()
* Add ns.gang.getInstallResults(memberName)
* Update definitions
* Add ram cost for ns.gang.getInstallResult()
* Fix typo
* More specific wording in documentation
* Fix another typo
* Run prettier
* Rename getInstallResults to getPostInstallPoints
* Update Prestige.ts
* Update Gang.ts
2024-02-23 12:58:22 -08:00
hydroflame
d00fad472e Merge pull request #1117 from bitburner-official/hydroflame-patch-1
Update package.json
2024-02-21 16:11:48 -05:00
hydroflame
b655b7a44e Update package.json 2024-02-21 16:11:22 -05:00
LJ
1577467fe1 BUGFIX: Prevent renaming servers to hacknet. (#1112)
* Add hacknet check to renaming
* Handle manual server purchases
* Handle automated server purchases
* Remove unnecessary parenthesis

fixes #1111
2024-02-20 18:22:24 -08:00
Michael Ficocelli
ac05135f59 IPVGO: Ensure favor text is only shown for even-numbered winstreaks, not even loss streaks (#1110)
closes #1109

Ensure that loss streak tracking does not display the favor gain text, to avoid misleading players
2024-02-20 14:36:06 -08:00
Caldwell
47cf5c1610 SETTINGS: add tailRenderInterval (#1107)
currently tails are on a static rerender time of 1000ms
there are ways to force a rerender with ns.moveTail / ns.resizeTail
but i dont know why this shouldnt be a setting set by the player

currently its static set on creation of the tail window but that could be expanded to allow setting it per script
and maybe through a ns function
2024-02-19 11:19:03 -08:00
David Walker
e6755afcb3 Changelog (#1106) 2024-02-17 20:28:19 -08:00
LJ
27a8abbdec PORTS: Support all serializable data. (#1089)
A significant portion of players who use ports are passing objects through them. Currently they are required to handle that themselves via JSON serialization. This PR adds better support for passing objects; which is more convenient, extensive, and optimized (probably, more on this one later).

This adds zero overhead to existing (or when passing any primitive types) port usage, and also isn't a breaking change. The questions to debate here are:

Should objects be supported in the first place?
If so, how exactly do we want to serialize objects?
Based on an extensive discussion in Discord, the overwhelming majority answered "yes" to question one. As for question two, that has been much more hotly contested.

Ultimately, `structuredClone` was used, despite less-than-stellar performance, because other options were worse either in safety, speed, error-handling, or multiple of the above.
2024-02-17 19:15:17 -08:00
Shy
aba2336093 add purchasedPlayer to RFA server data (#1103) 2024-02-17 00:11:29 -05:00
Snarling
9b483bdd8a Servers are sorted on Active Scripts page (#1102) 2024-02-16 21:06:18 -05:00
Caldwell
8c8af38a3a MISC: refactor weaken effect calculation (#1076)
so far we calculate the effect of weaken in three +1 places
ns.weaken
ns.weakenAnalyze
terminal weaken

and server.weaken where the bn mult is applied

i extracted the logic into a new netscript helper function getWeakenEffect
this gives us one place if we want to change the formula

a side effect i added the server.cpuCores to the terminal weaken to future proof it if the npc server core pr (#963) is merged
2024-02-16 17:18:16 -08:00
adeilt
93b9a10e41 UI: Improve theme support. (#1079) 2024-02-15 23:51:07 -05:00
adeilt
22aec2a8b9 DOC: Fix outdated example for ns.spawn() (#1101) 2024-02-15 23:44:25 -05:00
Shy
ef334cb851 BUGFIX: make hacknet node a bit bigger and change unit to em (#1094)
PR #1070 caused some overflow when having hacknet servers.
2024-02-15 16:33:08 -08:00
Shy
c894aba8f5 BUGFIX: fix double stringify on server array (#1100)
The server array that the RFA currently sends is stringified twice. I fixed that and also added a proper ResultType for the new data
2024-02-15 16:27:03 -08:00
LJ
ddb10f833c TERMINAL: Add --ram-override flag to the run command (#1055)
* Add --ram-override flag to run command
* Update help command
* Fix whitespace
* Update run usage message
* Update autocomplete for run command
* Format
2024-02-15 05:51:37 -08:00
catloversg
733f2ccb5b CORPORATION: Improve performance of cycle valuation (#1088)
This PR is an alternative for PR #1085. It includes these changes:

* Create a new property: numberOfOfficesAndWarehouses. It's used for calculating cycle valuation.
* Hardcode 1.0079741404289038 instead of calculating Math.pow(1.1, 1 / 12).
2024-02-15 05:43:37 -08:00
LJ
dc7c9bb065 BUGFIX: Attach hostname to script links in ls command (#1062)
fixes #1051

* Add hostname to script editor page options
* Add hostname option to script editor page
* Attach hostname to script links in ls
* Fix script editor page option type
2024-02-15 05:39:50 -08:00
Caldwell
b79df29ef4 nerf n00dles (#1020)
the n00dles buff is meant as a meme as far as iam aware

but the corp changes made it the core part of a "fraud" strategy
because the corp funds added have now an alot bigger effect on the valuation
thats why i think a few more 0's are needed to tune it down back to a meme
2024-02-15 05:36:04 -08:00
LJ
078f94cbc0 BUGFIX: Fix script editor documentation button using wrong URL (#1099)
* Fix script editor documentation button
* Fix lint and import url
2024-02-15 04:55:36 -08:00
Caldwell
0ba337f091 BUGFIX: few bandaids for Bladeburner (#1093)
bandaids for 3 bugs in bladeburner
this really needs proper fixes and a alot of refactoring!

the manual action start didnt start tasks the right way, modifying an existing action object instead of creating a new one
therefore the current action wasnt shown on the stats overview

the api start action didnt check for the BladesSimulacrum Aug and didnt stop current Player tasks
so the next time Bladeburner proccessed it stopped the bladeburner tasks again
when the player was doing something else like crimes

sometimes blops had an action.count of 0 even when they wherent done in that bladeburner instance yet

this happends because the BlackOps class instances are only initialized on game load
and then later on BlackOps completion manipulated
this change doesnt reset on a bitnode change or when bladeburner is deleted through the dev Menu
as a quick fix i added a new resetBlackOps function that always runs when Bladeburner processes
this isnt the best solution but any proper fix i came up with requires a refactor that i couldnt do at this moment

credits to @TheAimMan for finding the clue that the count is the problem not the rank!

edit,;
added a 4th bandaid to avoid NaN Stamina Penalty when stamina is infinite
2024-02-15 04:48:04 -08:00
Snarling
fca414e7c9 changelog
Also undid a weird style change from #1083 that I accidentally included.
2024-02-10 08:24:05 -05:00
Michael Ficocelli
ca374076b8 [IPvGO] Remove testing flag (#1016) 2024-02-10 08:04:21 -05:00
Caldwell
84c4dba1e2 UI: fix scripts recorded offline income (#1025) 2024-02-10 07:24:55 -05:00
Caldwell
fccc27fe58 MISC: HGWOptions accepts non integer (#1035) 2024-02-10 07:24:11 -05:00
catloversg
65214c0322 Change the calculation of valuation (#1056) 2024-02-10 06:48:52 -05:00
Shy
903f812424 REMOTE: add 'getAllServers' method to RFA (#1058) 2024-02-10 06:31:35 -05:00
Rinne
e8311d4f05 Changing color of stocks going up (#1065) 2024-02-10 06:28:18 -05:00
Caldwell
8c2a23f2ba MISC: change all nextUpdates to use one Promise (#1069) 2024-02-10 06:27:47 -05:00
Shy
fbc41d0278 make hacknet node grid dynamic (#1070) 2024-02-10 04:15:27 -05:00
TheAimMan
e966e78b72 MISC: Add an option to run b1t_flume with a "quick" option (#1072) 2024-02-10 04:14:11 -05:00
Caldwell
4d551915b3 MISC: move server constants into their own constant (#1075) 2024-02-10 04:13:42 -05:00
LJ
fd5b0f8241 MISC: Use structuredClone() for deep cloning (#1077) 2024-02-10 04:10:19 -05:00
Rinne
6bd50e6f24 BUGFIX: Fixed bug that returned Infinity cost for most skills (#1084) 2024-02-10 04:01:42 -05:00
Snarling
9697a82e0c UI: Active Scripts changes (followup to #933) (#1083) 2024-02-10 03:59:20 -05:00
Snarling
187226a30f Changelog 2024-02-01 18:20:36 -05:00
LJ
2f2355942f Kill all scripts upon entering the bitverse (#1042) 2024-01-31 19:44:31 -05:00
TheAimMan
330a32e1d0 MISC: Don't include temporary scripts into Recently Killed (#1045) 2024-01-31 19:43:48 -05:00
LJ
011d5e8fd6 BUGFIX: Properly deep copy array data for coding contracts (#1064) 2024-01-31 19:43:04 -05:00
Rinne
5277db2c65 API: Changing return value of ns.bladeburner.getSkillUpgradeCost to return Infinity when the skill's level overshoot the maximum level (#1060) 2024-01-31 19:40:27 -05:00
Snarling
497618dc2f Generate missing docs 2024-01-31 19:37:08 -05:00
Snarling
0ded11af53 TERMINAL: Fix inconsistent / janky scrolling behavior (#1063) 2024-01-31 19:32:42 -05:00
Michael Ficocelli
cf45981cd2 [PATCH][IPVGO] Use colors from theme for white and black, to support lower-contrast options (#1074) 2024-01-31 19:32:28 -05:00
David Walker
55e21d1e19 Make grow formulas faster and more accurate. (#1044) 2024-01-31 19:27:31 -05:00
LJ
b6b4788845 GANG: Reuse one promise for ns.gang.nextUpdate() (#1068) 2024-01-27 17:25:30 -05:00
LJ
05295598a4 BUGFIX: Format money requirement in fl1ght.exe (#1061) 2024-01-25 01:45:39 -05:00
deansvendsen
cb7c75a3ce MISC: Gang Expenses category in MoneySource (#1043) 2024-01-23 18:18:56 -05:00
catloversg
51ac4d009c Fix wrong demandRange of Minerals (#1053) 2024-01-23 16:18:32 -05:00
deansvendsen
f79470148e DOCS: Adding information to CONTRIBUTING.md (#1049) 2024-01-23 16:18:00 -05:00
Snarling
788a7549da Update Constants.ts 2024-01-15 06:18:55 -05:00
Justin
39c5a356b1 BUGFIX: Fix writePort() error where deconstructing the Port class caused the reduce() function to lose its 'this' reference (#1037) 2024-01-15 06:14:13 -05:00
LJ
157ff8ea88 PORTS: Add ns.nextPortWrite() as a safer option (#1036) 2024-01-15 06:10:39 -05:00
Snarling
d0e66d5be2 Changelog update 2024-01-14 16:48:14 -05:00
Caldwell
2ac0470cea adding int stat to sleeve overview and more stats overview (#1030) 2024-01-14 16:34:48 -05:00
Jesse Clark
c5ca30d796 add descriptions for hacknet_node_level_cost and hacknet_node_core_cost (#1032) 2024-01-14 16:12:49 -05:00
Shockwave
63574bca0c MISC: Several typo fix in corporation modals (#1029) 2024-01-14 16:12:28 -05:00
Snarling
44f0a77c4e PORTS: One promise, one resolver (test) (#1022) 2024-01-14 16:05:57 -05:00
Michael Ficocelli
87c4cbbc57 [IPvGO] Performance enhancement: async move option lookup (#1028) 2024-01-09 18:46:01 -05:00
Caldwell
6f8a59593a EDITOR: fix disposing models (#1026) 2024-01-09 18:45:31 -05:00
TheAimMan
82511e5030 BUGFIX: Update formatPercent to not use a suffixStart of 0 (#1024) 2024-01-08 10:25:20 -05:00
Shockwave
7017f3c2f8 API: Fix serverExists() return true for not revealed servers (#1013) 2024-01-07 11:40:07 -05:00
Snarling
f0f335e09a changelog update, regenerate docs 2024-01-07 08:37:38 -05:00
LJ
a433c8284c NETSCRIPT: Add .script deprecation notice & migration guide (#1007) 2024-01-07 08:15:24 -05:00
TheAimMan
9827fda4a4 BUGFIX: formatNumber throws an error if suffixStart is too low (#957) 2024-01-07 08:14:02 -05:00
TheAimMan
dd9ace7891 PROGRAMS: Change flight.exe to easily display unmet requirements (#939) 2024-01-07 08:12:16 -05:00
Miłosz Giera
1b03618555 REMOTE: Added possibility to change target IP of remote API (#943) 2024-01-07 07:57:54 -05:00
Shy
68a8427838 EDITOR: Add file URI's to monaco to improve intellisense (#1017) 2024-01-07 07:13:52 -05:00
Michael Ficocelli
7e721c144e [IPvGO] Docs improvements and other feedback (#1011) 2024-01-05 20:50:28 -05:00
Collin Pearce
0da9d9d3c0 fix player input parsing for coding contracts that accept arrays of strings (#937) 2024-01-02 09:26:34 -05:00
Jesse Clark
8742df9588 fix for stanek.acceptGift not working (#1001) 2024-01-02 09:12:14 -05:00
catloversg
4db4b77954 Change import declaration of arg library (#962) 2023-12-28 02:00:12 -05:00
Jesse Clark
1dac133ef4 Align columns in warehouse storage breakdown (#970) 2023-12-28 00:25:57 -05:00
Shockwave
e096456c29 Update StaneksGiftRoot.tsx (#987) 2023-12-27 06:10:35 -05:00
Rinne
eba840dcd3 API: Updating typing for ns.singularity.getCurrentWork() (#989) 2023-12-27 06:06:45 -05:00
Snarling
550829a1c3 Fix #944 merge errors 2023-12-27 04:35:58 -05:00
draughtnyan
ccf0aa4771 UI: 'Disable Text Effects' setting applies to "corrupted text" (#944) 2023-12-27 03:30:08 -05:00
Snarling
e7b68676f5 UI: Hash upgrade descriptions use number formatting options (#996) 2023-12-27 03:26:40 -05:00
Snarling
498bb6128a Handle br tag in tables (#995) 2023-12-27 02:04:52 -05:00
Snarling
a42b72d31a INFILTRATION: Different visual rework for CheatCodeGame (#994) 2023-12-27 00:45:40 -05:00
Snarling
489ba595f3 VERSION: Begin 2.6.0 dev cycle (#992) 2023-12-26 11:53:27 -05:00
Michael Ficocelli
7ef12a0323 BITNODE: IPvGO territory control strategy game (#934) 2023-12-26 11:45:27 -05:00
318 changed files with 12392 additions and 1444 deletions

View File

@@ -1,10 +1,13 @@
import JSDOMEnvironment from "jest-environment-jsdom";
import { cloneDeep } from "lodash";
// https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
super(...args);
// TODO Tests aren't polyfilled.
this.global.structuredClone = cloneDeep;
// FIXME https://github.com/nodejs/node/issues/35889
// Add missing importActual() function to mirror requireActual(),
// which lets us work around the ESM bug.

View File

@@ -207,9 +207,17 @@ the following rules:
- Ensure you have run `npm run lint` to make sure your changes conform to the
rules enforced across the code base. The command will fail if any of the
linters find a violation.
- Ensure you have run `npm run format` to make sure your changes conform to the
style guide.
- Also, ensure you have run `npm run test` to make sure your changes pass
the automated tests.
- Do not check in any bundled files (`dist\*.bundle.js`) or the `index.html`
in the root of the repository. These will be updated as part of official
releases.
- The title of your Pull Request will need to be formatted like
`MISC: Reticulated the splines`, where the first word must be capitalised
and relate to the kind of change being implemented. Possible examples
are UI, BUGFIX, SERVERS, NETSCRIPT... You get the idea.
## As a Documenter

View File

@@ -1,6 +1,6 @@
{
"name": "bitburner",
"version": "2.5.2",
"version": "2.6.0",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@@ -1,9 +1,9 @@
{
"name": "bitburner",
"version": "2.5.2",
"version": "2.6.0",
"description": "A cyberpunk-themed programming incremental game",
"main": "main.js",
"author": "Daniel Xie, Olivier Gagnon, et al.",
"author": "Daniel Xie, hydroflame, et al.",
"mac": {
"icon": "./public/icons/mac/icon.icns",
"category": "public.app-category.games"

View File

@@ -7,6 +7,7 @@ module.exports = {
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
testPathIgnorePatterns: [".cypress", "node_modules", "dist"],
testEnvironment: "./FixJSDOMEnvironment.ts",
setupFiles: ["./jest.polyfills.js"],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/test/__mocks__/fileMock.js",

6
jest.polyfills.js Normal file
View File

@@ -0,0 +1,6 @@
const { TextEncoder, TextDecoder } = require("node:util");
Object.defineProperties(globalThis, {
TextEncoder: { value: TextEncoder },
TextDecoder: { value: TextDecoder },
});

View File

@@ -18,5 +18,5 @@ interface BasicHGWOptions
| --- | --- | --- | --- |
| [additionalMsec?](./bitburner.basichgwoptions.additionalmsec.md) | | number | _(Optional)_ Number of additional milliseconds that will be spent waiting between the start of the function and when it completes. |
| [stock?](./bitburner.basichgwoptions.stock.md) | | boolean | _(Optional)_ Set to true this action will affect the stock market. |
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. |
| [threads?](./bitburner.basichgwoptions.threads.md) | | number | _(Optional)_ Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values. |

View File

@@ -4,7 +4,7 @@
## BasicHGWOptions.threads property
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with.
Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. Accepts positive non integer values.
**Signature:**

View File

@@ -31,5 +31,5 @@ RAM cost: 4 GB
This function returns the number of skill points needed to upgrade the specified skill the specified number of times.
The function returns -1 if an invalid skill name is passed in.
The function returns -1 if an invalid skill name is passed in, and Infinity if the count overflows the maximum level.

View File

@@ -9,7 +9,7 @@ Generate a dummy contract.
**Signature:**
```typescript
createDummyContract(type: string): void;
createDummyContract(type: string): string;
```
## Parameters
@@ -20,7 +20,9 @@ createDummyContract(type: string): void;
**Returns:**
void
string
Filename of the contract.
## Remarks

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [companyName](./bitburner.companyworktask.companyname.md)
## CompanyWorkTask.companyName property
**Signature:**
```typescript
companyName: CompanyName;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
## CompanyWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md)
## CompanyWorkTask interface
Company Work
**Signature:**
```typescript
export interface CompanyWorkTask
```
## Remarks
An object representing the current work for a company
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [type](./bitburner.companyworktask.type.md)
## CompanyWorkTask.type property
**Signature:**
```typescript
type: "COMPANY";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
## CreateProgramWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md)
## CreateProgramWorkTask interface
Create Program
**Signature:**
```typescript
export interface CreateProgramWorkTask
```
## Remarks
An object representing the status of the program being created
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [programName](./bitburner.createprogramworktask.programname.md)
## CreateProgramWorkTask.programName property
**Signature:**
```typescript
programName: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [type](./bitburner.createprogramworktask.type.md)
## CreateProgramWorkTask.type property
**Signature:**
```typescript
type: "CREATE_PROGRAM";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [crimeType](./bitburner.crimetask.crimetype.md)
## CrimeTask.crimeType property
**Signature:**
```typescript
crimeType: CrimeType;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
## CrimeTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md)
## CrimeTask interface
Crime
**Signature:**
```typescript
export interface CrimeTask
```
## Remarks
An object representing the crime being commited
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | |
| [cyclesWorked](./bitburner.crimetask.cyclesworked.md) | | number | |
| [type](./bitburner.crimetask.type.md) | | "CRIME" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [type](./bitburner.crimetask.type.md)
## CrimeTask.type property
**Signature:**
```typescript
type: "CRIME";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [cyclesWorked](./bitburner.factionworktask.cyclesworked.md)
## FactionWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [factionName](./bitburner.factionworktask.factionname.md)
## FactionWorkTask.factionName property
**Signature:**
```typescript
factionName: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [factionWorkType](./bitburner.factionworktask.factionworktype.md)
## FactionWorkTask.factionWorkType property
**Signature:**
```typescript
factionWorkType: FactionWorkType;
```

View File

@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md)
## FactionWorkTask interface
Faction Work
**Signature:**
```typescript
export interface FactionWorkTask
```
## Remarks
An object representing the current work for a faction
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.factionworktask.cyclesworked.md) | | number | |
| [factionName](./bitburner.factionworktask.factionname.md) | | string | |
| [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [type](./bitburner.factionworktask.type.md) | | "FACTION" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [type](./bitburner.factionworktask.type.md)
## FactionWorkTask.type property
**Signature:**
```typescript
type: "FACTION";
```

View File

@@ -0,0 +1,32 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Gang](./bitburner.gang.md) &gt; [getInstallResult](./bitburner.gang.getinstallresult.md)
## Gang.getInstallResult() method
Get the effect of an install on ascension multipliers without installing.
**Signature:**
```typescript
getInstallResult(memberName: string): GangMemberInstall | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| memberName | string | Name of member. |
**Returns:**
[GangMemberInstall](./bitburner.gangmemberinstall.md) \| undefined
Object with info about the install results on ascension multipliers, or undefined if ascension is not possible.
## Remarks
RAM cost: 2 GB
Get [GangMemberInstall](./bitburner.gangmemberinstall.md) effects on ascension multipliers for a gang member after installing without performing the install.

View File

@@ -31,6 +31,7 @@ If you are not in BitNode-2, then you must have Source-File 2 in order to use th
| [getEquipmentStats(equipName)](./bitburner.gang.getequipmentstats.md) | Get stats of an equipment. |
| [getEquipmentType(equipName)](./bitburner.gang.getequipmenttype.md) | Get type of an equipment. |
| [getGangInformation()](./bitburner.gang.getganginformation.md) | Get information about your gang. |
| [getInstallResult(memberName)](./bitburner.gang.getinstallresult.md) | Get the effect of an install on ascension multipliers without installing. |
| [getMemberInformation(name)](./bitburner.gang.getmemberinformation.md) | Get information about a specific gang member. |
| [getMemberNames()](./bitburner.gang.getmembernames.md) | List all gang members. |
| [getOtherGangInformation()](./bitburner.gang.getotherganginformation.md) | Get information about the other gangs. |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [agi](./bitburner.gangmemberinstall.agi.md)
## GangMemberInstall.agi property
Factor by which the agility ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
agi: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [cha](./bitburner.gangmemberinstall.cha.md)
## GangMemberInstall.cha property
Factor by which the charisma ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
cha: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [def](./bitburner.gangmemberinstall.def.md)
## GangMemberInstall.def property
Factor by which the defense ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
def: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [dex](./bitburner.gangmemberinstall.dex.md)
## GangMemberInstall.dex property
Factor by which the dexterity ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
dex: number;
```

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [hack](./bitburner.gangmemberinstall.hack.md)
## GangMemberInstall.hack property
Factor by which the hacking ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
hack: number;
```

View File

@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md)
## GangMemberInstall interface
**Signature:**
```typescript
interface GangMemberInstall
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [agi](./bitburner.gangmemberinstall.agi.md) | | number | Factor by which the agility ascension multiplier was decreased (newMult / oldMult) |
| [cha](./bitburner.gangmemberinstall.cha.md) | | number | Factor by which the charisma ascension multiplier was decreased (newMult / oldMult) |
| [def](./bitburner.gangmemberinstall.def.md) | | number | Factor by which the defense ascension multiplier was decreased (newMult / oldMult) |
| [dex](./bitburner.gangmemberinstall.dex.md) | | number | Factor by which the dexterity ascension multiplier was decreased (newMult / oldMult) |
| [hack](./bitburner.gangmemberinstall.hack.md) | | number | Factor by which the hacking ascension multiplier was decreased (newMult / oldMult) |
| [str](./bitburner.gangmemberinstall.str.md) | | number | Factor by which the strength ascension multiplier was decreased (newMult / oldMult) |

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GangMemberInstall](./bitburner.gangmemberinstall.md) &gt; [str](./bitburner.gangmemberinstall.str.md)
## GangMemberInstall.str property
Factor by which the strength ascension multiplier was decreased (newMult / oldMult)
**Signature:**
```typescript
str: number;
```

View File

@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [analysis](./bitburner.go.analysis.md)
## Go.analysis property
Tools to analyze the IPvGO subnet.
**Signature:**
```typescript
analysis: {
getValidMoves(): boolean[][];
getChains(): (number | null)[][];
getLiberties(): number[][];
getControlledEmptyNodes(): string[];
};
```

View File

@@ -0,0 +1,55 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [cheat](./bitburner.go.cheat.md)
## Go.cheat property
Illicit and dangerous IPvGO tools. Not for the faint of heart. Requires Bitnode 14.2 to use.
**Signature:**
```typescript
cheat: {
getCheatSuccessChance(): number;
removeRouter(
x: number,
y: number,
): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
playTwoMoves(
x1: number,
y1: number,
x2: number,
y2: number,
): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
repairOfflineNode(
x: number,
y: number,
): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
destroyNode(
x: number,
y: number,
): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
};
```

View File

@@ -0,0 +1,38 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [getBoardState](./bitburner.go.getboardstate.md)
## Go.getBoardState() method
Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)
For example, a 5x5 board might look like this:
```
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
Each string represents a vertical column on the board, and each character in the string represents a point.
Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].
Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.
**Signature:**
```typescript
getBoardState(): string[];
```
**Returns:**
string\[\]
## Remarks
RAM cost: 4 GB

View File

@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [getOpponent](./bitburner.go.getopponent.md)
## Go.getOpponent() method
Returns the name of the opponent faction in the current subnet.
**Signature:**
```typescript
getOpponent(): GoOpponent | "No AI" | "????????????";
```
**Returns:**
[GoOpponent](./bitburner.goopponent.md) \| "No AI" \| "????????????"

View File

@@ -0,0 +1,39 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [makeMove](./bitburner.go.makemove.md)
## Go.makeMove() method
Make a move on the IPvGO subnet gameboard, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI.
**Signature:**
```typescript
makeMove(
x: number,
y: number,
): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| x | number | |
| y | number | |
**Returns:**
Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;
a promise that contains if your move was valid and successful, the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
## Remarks
RAM cost: 4 GB

41
markdown/bitburner.go.md Normal file
View File

@@ -0,0 +1,41 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md)
## Go interface
IPvGO api
**Signature:**
```typescript
export interface Go
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [analysis](./bitburner.go.analysis.md) | | { getValidMoves(): boolean\[\]\[\]; getChains(): (number \| null)\[\]\[\]; getLiberties(): number\[\]\[\]; getControlledEmptyNodes(): string\[\]; } | Tools to analyze the IPvGO subnet. |
| [cheat](./bitburner.go.cheat.md) | | { getCheatSuccessChance(): number; removeRouter( x: number, y: number, ): Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;; playTwoMoves( x1: number, y1: number, x2: number, y2: number, ): Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;; repairOfflineNode( x: number, y: number, ): Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;; destroyNode( x: number, y: number, ): Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;; } | Illicit and dangerous IPvGO tools. Not for the faint of heart. Requires Bitnode 14.2 to use. |
## Methods
| Method | Description |
| --- | --- |
| [getBoardState()](./bitburner.go.getboardstate.md) | <p>Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)</p><p>For example, a 5x5 board might look like this:</p>
```
[
"XX.O.",
"X..OO",
".XO..",
"XXO.#",
".XO.#",
]
```
<p>Each string represents a vertical column on the board, and each character in the string represents a point.</p><p>Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].</p><p>Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.</p> |
| [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. |
| [makeMove(x, y)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet gameboard, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. |
| [passTurn()](./bitburner.go.passturn.md) | <p>Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.</p><p>This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.</p> |
| [resetBoardState(opponent, boardSize)](./bitburner.go.resetboardstate.md) | <p>Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.</p><p>Note that some factions will have a few routers on the subnet at this state.</p><p>opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Daedalus" or "Illuminati",</p> |

View File

@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [passTurn](./bitburner.go.passturn.md)
## Go.passTurn() method
Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.
This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.
**Signature:**
```typescript
passTurn(): Promise<{
type: "invalid" | "move" | "pass" | "gameOver";
x: number;
y: number;
success: boolean;
}>;
```
**Returns:**
Promise&lt;{ type: "invalid" \| "move" \| "pass" \| "gameOver"; x: number; y: number; success: boolean; }&gt;
a promise that contains if your move was valid and successful, the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
## Remarks
RAM cost: 0 GB

View File

@@ -0,0 +1,35 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Go](./bitburner.go.md) &gt; [resetBoardState](./bitburner.go.resetboardstate.md)
## Go.resetBoardState() method
Gets new IPvGO subnet with the specified size owned by the listed faction, ready for the player to make a move. This will reset your win streak if the current game is not complete and you have already made moves.
Note that some factions will have a few routers on the subnet at this state.
opponent is "Netburners" or "Slum Snakes" or "The Black Hand" or "Daedalus" or "Illuminati",
**Signature:**
```typescript
resetBoardState(opponent: GoOpponent, boardSize: 5 | 7 | 9 | 13): string[] | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| opponent | [GoOpponent](./bitburner.goopponent.md) | |
| boardSize | 5 \| 7 \| 9 \| 13 | |
**Returns:**
string\[\] \| undefined
a simplified version of the board state as an array of strings representing the board columns. See ns.Go.getBoardState() for full details
## Remarks
RAM cost: 0 GB

View File

@@ -0,0 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GoOpponent](./bitburner.goopponent.md)
## GoOpponent type
**Signature:**
```typescript
type GoOpponent = "Netburners" | "Slum Snakes" | "The Black Hand" | "Tetrads" | "Daedalus" | "Illuminati";
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GraftingTask](./bitburner.graftingtask.md) &gt; [augmentation](./bitburner.graftingtask.augmentation.md)
## GraftingTask.augmentation property
**Signature:**
```typescript
augmentation: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GraftingTask](./bitburner.graftingtask.md) &gt; [cyclesWorked](./bitburner.graftingtask.cyclesworked.md)
## GraftingTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GraftingTask](./bitburner.graftingtask.md)
## GraftingTask interface
Faction Work
**Signature:**
```typescript
export interface GraftingTask
```
## Remarks
An object representing the current grafting status
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GraftingTask](./bitburner.graftingtask.md) &gt; [type](./bitburner.graftingtask.type.md)
## GraftingTask.type property
**Signature:**
```typescript
type: "GRAFTING";
```

View File

@@ -39,18 +39,22 @@
| [CodingContract](./bitburner.codingcontract.md) | Coding Contract API |
| [CompanyPositionInfo](./bitburner.companypositioninfo.md) | Company position requirements and salary. |
| [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) | Player must have at least this much reputation with this company. |
| [CompanyWorkTask](./bitburner.companyworktask.md) | Company Work |
| [CorpConstants](./bitburner.corpconstants.md) | Corporation related constants |
| [CorpIndustryData](./bitburner.corpindustrydata.md) | Data for an individual industry |
| [CorpMaterialConstantData](./bitburner.corpmaterialconstantdata.md) | Corporation material information |
| [Corporation](./bitburner.corporation.md) | Corporation API |
| [CorporationInfo](./bitburner.corporationinfo.md) | General info about a corporation |
| [CorpProductData](./bitburner.corpproductdata.md) | Product rating information |
| [CreateProgramWorkTask](./bitburner.createprogramworktask.md) | Create Program |
| [CrimeStats](./bitburner.crimestats.md) | Data representing the internal values of a crime. |
| [CrimeTask](./bitburner.crimetask.md) | Crime |
| [Division](./bitburner.division.md) | Corporation division |
| [EmployedByRequirement](./bitburner.employedbyrequirement.md) | Player must be working for this company. |
| [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. |
| [EveryRequirement](./bitburner.everyrequirement.md) | All sub-conditions must be satisfied. |
| [Export](./bitburner.export.md) | Export order for a material |
| [FactionWorkTask](./bitburner.factionworktask.md) | Faction Work |
| [FileRequirement](./bitburner.filerequirement.md) | Player must have a specific Literature or Message file on their home computer. |
| [Formulas](./bitburner.formulas.md) | Formulas API |
| [Fragment](./bitburner.fragment.md) | |
@@ -60,11 +64,14 @@
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
| [GangMemberInstall](./bitburner.gangmemberinstall.md) | |
| [GangOtherInfo](./bitburner.gangotherinfo.md) | |
| [GangOtherInfoObject](./bitburner.gangotherinfoobject.md) | |
| [GangTaskStats](./bitburner.gangtaskstats.md) | Object representing data representing a gang member task. |
| [GangTerritory](./bitburner.gangterritory.md) | |
| [Go](./bitburner.go.md) | IPvGO api |
| [Grafting](./bitburner.grafting.md) | Grafting API |
| [GraftingTask](./bitburner.graftingtask.md) | Faction Work |
| [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
| [HackingMultipliers](./bitburner.hackingmultipliers.md) | Hack related multipliers. |
| [Hacknet](./bitburner.hacknet.md) | Hacknet API |
@@ -126,6 +133,7 @@
| [StockMarketConstants](./bitburner.stockmarketconstants.md) | Constants used for the stockmarket game mechanic. |
| [StockOrder](./bitburner.stockorder.md) | <p>Return value of [getOrders](./bitburner.tix.getorders.md)</p><p>Keys are stock symbols, properties are arrays of [StockOrderObject](./bitburner.stockorderobject.md)</p> |
| [StockOrderObject](./bitburner.stockorderobject.md) | Value in map of [StockOrder](./bitburner.stockorder.md) |
| [StudyTask](./bitburner.studytask.md) | Study |
| [TailProperties](./bitburner.tailproperties.md) | |
| [TIX](./bitburner.tix.md) | Stock market API |
| [UserInterface](./bitburner.userinterface.md) | User Interface API. |
@@ -149,9 +157,9 @@
| [CorpUnlockName](./bitburner.corpunlockname.md) | |
| [CorpUpgradeName](./bitburner.corpupgradename.md) | |
| [FilenameOrPID](./bitburner.filenameorpid.md) | |
| [GoOpponent](./bitburner.goopponent.md) | |
| [NSEnums](./bitburner.nsenums.md) | |
| [PlayerRequirement](./bitburner.playerrequirement.md) | Structured interface to requirements for joining a faction or company. For fields with numerical value &gt; 0, the player must have at least this value. For fields with numerical value &lt;<!-- -->= 0, the player must have at most this value. For "not", the sub-condition must be failed instead of passed. For "someCondition", at least one sub-condition must be passed. |
| [PortData](./bitburner.portdata.md) | |
| [ReactNode](./bitburner.reactnode.md) | <p>A stand-in for the real React.ReactNode. A [ReactElement](./bitburner.reactelement.md) is rendered dynamically with React. number and string are displayed directly. boolean, null, and undefined are ignored and not rendered. An array of ReactNodes will display all members of that array sequentially.</p><p>Use React.createElement to make the ReactElement type, see [creating an element without jsx](https://react.dev/reference/react/createElement#creating-an-element-without-jsx) from the official React documentation.</p> |
| [ScriptArg](./bitburner.scriptarg.md) | |
| [SleeveBladeburnerTask](./bitburner.sleevebladeburnertask.md) | |
@@ -164,4 +172,5 @@
| [SleeveSupportTask](./bitburner.sleevesupporttask.md) | |
| [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) | |
| [SleeveTask](./bitburner.sleevetask.md) | Object representing a sleeve current task. |
| [Task](./bitburner.task.md) | Task |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [MoneySource](./bitburner.moneysource.md) &gt; [gang\_expenses](./bitburner.moneysource.gang_expenses.md)
## MoneySource.gang\_expenses property
**Signature:**
```typescript
gang_expenses: number;
```

View File

@@ -22,6 +22,7 @@ interface MoneySource
| [codingcontract](./bitburner.moneysource.codingcontract.md) | | number | |
| [corporation](./bitburner.moneysource.corporation.md) | | number | |
| [crime](./bitburner.moneysource.crime.md) | | number | |
| [gang\_expenses](./bitburner.moneysource.gang_expenses.md) | | number | |
| [gang](./bitburner.moneysource.gang.md) | | number | |
| [hacking](./bitburner.moneysource.hacking.md) | | number | |
| [hacknet\_expenses](./bitburner.moneysource.hacknet_expenses.md) | | number | |

View File

@@ -19,7 +19,7 @@ export interface NetscriptPort
| [clear()](./bitburner.netscriptport.clear.md) | Empties all data from the port. |
| [empty()](./bitburner.netscriptport.empty.md) | Check if the port is empty. |
| [full()](./bitburner.netscriptport.full.md) | Check if the port is full. |
| [nextWrite()](./bitburner.netscriptport.nextwrite.md) | Sleeps until the port is written to. |
| [nextWrite()](./bitburner.netscriptport.nextwrite.md) | Waits until the port is written to. |
| [peek()](./bitburner.netscriptport.peek.md) | Retrieve the first element from the port without removing it. |
| [read()](./bitburner.netscriptport.read.md) | Shift an element out of the port. |
| [tryWrite(value)](./bitburner.netscriptport.trywrite.md) | Attempt to write data to the port. |

View File

@@ -4,7 +4,7 @@
## NetscriptPort.nextWrite() method
Sleeps until the port is written to.
Waits until the port is written to.
**Signature:**

View File

@@ -9,11 +9,11 @@ Retrieve the first element from the port without removing it.
**Signature:**
```typescript
peek(): PortData;
peek(): any;
```
**Returns:**
[PortData](./bitburner.portdata.md)
any
the data read

View File

@@ -9,11 +9,11 @@ Shift an element out of the port.
**Signature:**
```typescript
read(): PortData;
read(): any;
```
**Returns:**
[PortData](./bitburner.portdata.md)
any
the data read.

View File

@@ -9,14 +9,14 @@ Attempt to write data to the port.
**Signature:**
```typescript
tryWrite(value: string | number): boolean;
tryWrite(value: any): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | string \| number | |
| value | any | Data to write, it's cloned with structuredClone(). |
**Returns:**

View File

@@ -9,18 +9,18 @@ Write data to a port.
**Signature:**
```typescript
write(value: string | number): PortData | null;
write(value: any): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | string \| number | |
| value | any | Data to write, it's cloned with structuredClone(). |
**Returns:**
[PortData](./bitburner.portdata.md) \| null
any
The data popped off the queue if it was full.

View File

@@ -9,7 +9,7 @@ Add callback function when the script dies
**Signature:**
```typescript
atExit(f: () => void): void;
atExit(f: () => void, id?: string): void;
```
## Parameters
@@ -17,6 +17,7 @@ atExit(f: () => void): void;
| Parameter | Type | Description |
| --- | --- | --- |
| f | () =&gt; void | |
| id | string | _(Optional)_ |
**Returns:**

View File

@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [go](./bitburner.ns.go.md)
## NS.go property
Namespace for Go functions.
**Signature:**
```typescript
readonly go: Go;
```
## Remarks
RAM cost: 0 GB

View File

@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [heart](./bitburner.ns.heart.md)
## NS.heart property
**Signature:**
```typescript
readonly heart: {
break(): number;
};
```

View File

@@ -38,8 +38,10 @@ export async function main(ns) {
| [enums](./bitburner.ns.enums.md) | | [NSEnums](./bitburner.nsenums.md) | |
| [formulas](./bitburner.ns.formulas.md) | <code>readonly</code> | [Formulas](./bitburner.formulas.md) | Namespace for formulas functions. |
| [gang](./bitburner.ns.gang.md) | <code>readonly</code> | [Gang](./bitburner.gang.md) | Namespace for gang functions. Contains spoilers. |
| [go](./bitburner.ns.go.md) | <code>readonly</code> | [Go](./bitburner.go.md) | Namespace for Go functions. |
| [grafting](./bitburner.ns.grafting.md) | <code>readonly</code> | [Grafting](./bitburner.grafting.md) | Namespace for grafting functions. Contains spoilers. |
| [hacknet](./bitburner.ns.hacknet.md) | <code>readonly</code> | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. Some of this API contains spoilers. |
| [heart](./bitburner.ns.heart.md) | <code>readonly</code> | { break(): number; } | |
| [infiltration](./bitburner.ns.infiltration.md) | <code>readonly</code> | [Infiltration](./bitburner.infiltration.md) | Namespace for infiltration functions. |
| [pid](./bitburner.ns.pid.md) | <code>readonly</code> | number | The current script's PID |
| [singularity](./bitburner.ns.singularity.md) | <code>readonly</code> | [Singularity](./bitburner.singularity.md) | Namespace for singularity functions. Contains spoilers. |
@@ -54,7 +56,7 @@ export async function main(ns) {
| --- | --- |
| [alert(msg)](./bitburner.ns.alert.md) | Open up a message box. |
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. |
| [atExit(f)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
| [atExit(f, id)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
| [brutessh(host)](./bitburner.ns.brutessh.md) | Runs BruteSSH.exe on a server. |
| [clear(handle)](./bitburner.ns.clear.md) | Clear data from a file. |
| [clearLog()](./bitburner.ns.clearlog.md) | Clears the scripts logs. |
@@ -131,6 +133,7 @@ export async function main(ns) {
| [ls(host, substring)](./bitburner.ns.ls.md) | List files on a server. |
| [moveTail(x, y, pid)](./bitburner.ns.movetail.md) | Move a tail window. |
| [mv(host, source, destination)](./bitburner.ns.mv.md) | Move a file on the target server. |
| [nextPortWrite(port)](./bitburner.ns.nextportwrite.md) | Listen for a port write. |
| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number using the numeral library. This function is deprecated and will be removed in 2.4. |
| [nuke(host)](./bitburner.ns.nuke.md) | Runs NUKE.exe on a server. |
| [peek(portNumber)](./bitburner.ns.peek.md) | Get a copy of the data from a port without popping it. |

View File

@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [nextPortWrite](./bitburner.ns.nextportwrite.md)
## NS.nextPortWrite() method
Listen for a port write.
**Signature:**
```typescript
nextPortWrite(port: number): Promise<void>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| port | number | Port to listen for a write on. Must be a positive integer. |
**Returns:**
Promise&lt;void&gt;
## Remarks
RAM cost: 0 GB
Sleeps until the port is written to.

View File

@@ -9,7 +9,7 @@ Get a copy of the data from a port without popping it.
**Signature:**
```typescript
peek(portNumber: number): PortData;
peek(portNumber: number): any;
```
## Parameters
@@ -20,7 +20,7 @@ peek(portNumber: number): PortData;
**Returns:**
[PortData](./bitburner.portdata.md)
any
Data in the specified port.

View File

@@ -9,7 +9,7 @@ Read data from a port.
**Signature:**
```typescript
readPort(portNumber: number): PortData;
readPort(portNumber: number): any;
```
## Parameters
@@ -20,7 +20,7 @@ readPort(portNumber: number): PortData;
**Returns:**
[PortData](./bitburner.portdata.md)
any
The data read.

View File

@@ -17,7 +17,7 @@ spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: (string
| Parameter | Type | Description |
| --- | --- | --- |
| script | string | Filename of script to execute. |
| threadOrOptions | number \| [SpawnOptions](./bitburner.spawnoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [SpawnOptions](./bitburner.spawnoptions.md) object. Threads defaults to 1. |
| threadOrOptions | number \| [SpawnOptions](./bitburner.spawnoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [SpawnOptions](./bitburner.spawnoptions.md) object. Threads defaults to 1 and spawnDelay defaults to 10,000 ms. |
| args | (string \| number \| boolean)\[\] | Additional arguments to pass into the new script that is being run. |
**Returns:**
@@ -39,6 +39,6 @@ Running this function with 0 or fewer threads will cause a runtime error.
```js
//The following example will execute the script foo.js with 10 threads, in 500 milliseconds and the arguments foodnstuff and 90:
ns.spawn('foo.js', 10, 500, 'foodnstuff', 90);
ns.spawn('foo.js', {threads: 10, spawnDelay: 500}, 'foodnstuff', 90);
```

View File

@@ -9,7 +9,7 @@ Attempt to write to a port.
**Signature:**
```typescript
tryWritePort(portNumber: number, data: string | number): boolean;
tryWritePort(portNumber: number, data: any): boolean;
```
## Parameters
@@ -17,7 +17,7 @@ tryWritePort(portNumber: number, data: string | number): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| portNumber | number | Port to attempt to write to. Must be a positive integer. |
| data | string \| number | Data to write. |
| data | any | Data to write, it's cloned with structuredClone(). |
**Returns:**

View File

@@ -9,7 +9,7 @@ Write data to a port.
**Signature:**
```typescript
writePort(portNumber: number, data: string | number): PortData | null;
writePort(portNumber: number, data: any): any;
```
## Parameters
@@ -17,11 +17,11 @@ writePort(portNumber: number, data: string | number): PortData | null;
| Parameter | Type | Description |
| --- | --- | --- |
| portNumber | number | Port to write to. Must be a positive integer. |
| data | string \| number | Data to write. |
| data | any | Data to write, it's cloned with structuredClone(). |
**Returns:**
[PortData](./bitburner.portdata.md) \| null
any
The data popped off the queue if it was full, or null if it was not full.

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Player](./bitburner.player.md) &gt; [karma](./bitburner.player.karma.md)
## Player.karma property
**Signature:**
```typescript
karma: number;
```

View File

@@ -19,6 +19,7 @@ interface Player extends Person
| [entropy](./bitburner.player.entropy.md) | | number | |
| [factions](./bitburner.player.factions.md) | | string\[\] | |
| [jobs](./bitburner.player.jobs.md) | | Partial&lt;Record&lt;[CompanyName](./bitburner.companyname.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->&gt;&gt; | |
| [karma](./bitburner.player.karma.md) | | number | |
| [location](./bitburner.player.location.md) | | string | |
| [money](./bitburner.player.money.md) | | number | |
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |

View File

@@ -1,12 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [PortData](./bitburner.portdata.md)
## PortData type
**Signature:**
```typescript
type PortData = string | number;
```

View File

@@ -9,11 +9,11 @@ Get the current work the player is doing.
**Signature:**
```typescript
getCurrentWork(): any | null;
getCurrentWork(): Task | null;
```
**Returns:**
any \| null
[Task](./bitburner.task.md) \| null
- An object representing the current work. Fields depend on the kind of work.

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md) &gt; [classType](./bitburner.studytask.classtype.md)
## StudyTask.classType property
**Signature:**
```typescript
classType: string;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md) &gt; [cyclesWorked](./bitburner.studytask.cyclesworked.md)
## StudyTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md) &gt; [location](./bitburner.studytask.location.md)
## StudyTask.location property
**Signature:**
```typescript
location: string;
```

View File

@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md)
## StudyTask interface
Study
**Signature:**
```typescript
export interface StudyTask
```
## Remarks
An object representing the current study task
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [classType](./bitburner.studytask.classtype.md) | | string | |
| [cyclesWorked](./bitburner.studytask.cyclesworked.md) | | number | |
| [location](./bitburner.studytask.location.md) | | string | |
| [type](./bitburner.studytask.type.md) | | "CLASS" | |

View File

@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md) &gt; [type](./bitburner.studytask.type.md)
## StudyTask.type property
**Signature:**
```typescript
type: "CLASS";
```

View File

@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Task](./bitburner.task.md)
## Task type
Task
**Signature:**
```typescript
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;
```
**References:** [StudyTask](./bitburner.studytask.md)<!-- -->, [CompanyWorkTask](./bitburner.companyworktask.md)<!-- -->, [CreateProgramWorkTask](./bitburner.createprogramworktask.md)<!-- -->, [CrimeTask](./bitburner.crimetask.md)<!-- -->, [FactionWorkTask](./bitburner.factionworktask.md)<!-- -->, [GraftingTask](./bitburner.graftingtask.md)
## Remarks
Represents any task, such as studying, working for a faction etc.

211
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "bitburner",
"version": "2.5.2",
"version": "2.6.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "2.5.2",
"version": "2.6.0",
"hasInstallScript": true,
"license": "SEE LICENSE IN license.txt",
"dependencies": {
@@ -90,6 +90,8 @@
"prettier": "^2.8.8",
"raw-loader": "^4.0.2",
"react-refresh": "^0.14.0",
"rehype-mathjax": "^4.0.3",
"remark-math": "^5.1.1",
"source-map": "^0.7.4",
"start-server-and-test": "^1.15.4",
"style-loader": "^3.3.3",
@@ -4465,6 +4467,12 @@
"integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
"dev": true
},
"node_modules/@types/katex": {
"version": "0.16.7",
"resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz",
"integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==",
"dev": true
},
"node_modules/@types/keyv": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
@@ -4480,6 +4488,12 @@
"integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==",
"dev": true
},
"node_modules/@types/mathjax": {
"version": "0.0.37",
"resolved": "https://registry.npmjs.org/@types/mathjax/-/mathjax-0.0.37.tgz",
"integrity": "sha512-y0WSZBtBNQwcYipTU/BhgeFu1EZNlFvUNCmkMXV9kBQZq7/o5z82dNVyH3yy2Xv5zzeNeQoHSL4Xm06+EQiH+g==",
"dev": true
},
"node_modules/@types/mdast": {
"version": "3.0.13",
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.13.tgz",
@@ -9518,6 +9532,64 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hast-util-from-dom": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz",
"integrity": "sha512-t1RJW/OpJbCAJQeKi3Qrj1cAOLA0+av/iPFori112+0X7R3wng+jxLA+kXec8K4szqPRGI8vPxbbpEYvvpwaeQ==",
"dev": true,
"dependencies": {
"hastscript": "^7.0.0",
"web-namespaces": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-from-dom/node_modules/hast-util-parse-selector": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz",
"integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==",
"dev": true,
"dependencies": {
"@types/hast": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-from-dom/node_modules/hastscript": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz",
"integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==",
"dev": true,
"dependencies": {
"@types/hast": "^2.0.0",
"comma-separated-tokens": "^2.0.0",
"hast-util-parse-selector": "^3.0.0",
"property-information": "^6.0.0",
"space-separated-tokens": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-is-element": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-2.1.3.tgz",
"integrity": "sha512-O1bKah6mhgEq2WtVMk+Ta5K7pPMqsBBlmzysLdcwKVrqzZQ0CHqUPiIVspNhAG1rvxpvJjtGee17XfauZYKqVA==",
"dev": true,
"dependencies": {
"@types/hast": "^2.0.0",
"@types/unist": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-parse-selector": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz",
@@ -9527,6 +9599,22 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-text": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-3.1.2.tgz",
"integrity": "sha512-tcllLfp23dJJ+ju5wCCZHVpzsQQ43+moJbqVX3jNWPB7z/KFC4FyZD6R7y94cHL6MQ33YtMZL8Z0aIXXI4XFTw==",
"dev": true,
"dependencies": {
"@types/hast": "^2.0.0",
"@types/unist": "^2.0.0",
"hast-util-is-element": "^2.0.0",
"unist-util-find-after": "^4.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-whitespace": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz",
@@ -12713,6 +12801,31 @@
"node": ">=8"
}
},
"node_modules/katex": {
"version": "0.16.9",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz",
"integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==",
"dev": true,
"funding": [
"https://opencollective.com/katex",
"https://github.com/sponsors/katex"
],
"dependencies": {
"commander": "^8.3.0"
},
"bin": {
"katex": "cli.js"
}
},
"node_modules/katex/node_modules/commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
"integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
"dev": true,
"engines": {
"node": ">= 12"
}
},
"node_modules/keyv": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
@@ -13245,6 +13358,21 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-math": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-2.0.2.tgz",
"integrity": "sha512-8gmkKVp9v6+Tgjtq6SYx9kGPpTf6FVYRa53/DLh479aldR9AyP48qeVOgNZ5X7QUK7nOy4yw7vg6mbiGcs9jWQ==",
"dev": true,
"dependencies": {
"@types/mdast": "^3.0.0",
"longest-streak": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-phrasing": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz",
@@ -13550,6 +13678,25 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-math": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-2.1.2.tgz",
"integrity": "sha512-es0CcOV89VNS9wFmyn+wyFTKweXGW4CEvdaAca6SWRWPyYCbBisnjaHLjWO4Nszuiud84jCpkHsqAJoa768Pvg==",
"dev": true,
"dependencies": {
"@types/katex": "^0.16.0",
"katex": "^0.16.0",
"micromark-factory-space": "^1.0.0",
"micromark-util-character": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-factory-destination": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz",
@@ -15732,6 +15879,26 @@
"jsesc": "bin/jsesc"
}
},
"node_modules/rehype-mathjax": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/rehype-mathjax/-/rehype-mathjax-4.0.3.tgz",
"integrity": "sha512-QIwWH9U+r54nMQklVkT1qluxhKyzdPWz9dFwgel3BrseQsWZafRTDTUj8VR8/14nFuRIV2ChuCMz4zpACPoYvg==",
"dev": true,
"dependencies": {
"@types/hast": "^2.0.0",
"@types/mathjax": "^0.0.37",
"hast-util-from-dom": "^4.0.0",
"hast-util-to-text": "^3.1.0",
"jsdom": "^20.0.0",
"mathjax-full": "^3.0.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
@@ -15756,6 +15923,22 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-math": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/remark-math/-/remark-math-5.1.1.tgz",
"integrity": "sha512-cE5T2R/xLVtfFI4cCePtiRn+e6jKMtFDR3P8V3qpv8wpKjwvHoBA4eJzvX+nVrnlNy0911bdGmuspCSwetfYHw==",
"dev": true,
"dependencies": {
"@types/mdast": "^3.0.0",
"mdast-util-math": "^2.0.0",
"micromark-extension-math": "^2.0.0",
"unified": "^10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-parse": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz",
@@ -17371,6 +17554,20 @@
"node": ">= 0.8.0"
}
},
"node_modules/unist-util-find-after": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-4.0.1.tgz",
"integrity": "sha512-QO/PuPMm2ERxC6vFXEPtmAutOopy5PknD+Oq64gGwxKtk4xwo9Z97t9Av1obPmGU0IyTa6EKYUfTrK2QJS3Ozw==",
"dev": true,
"dependencies": {
"@types/unist": "^2.0.0",
"unist-util-is": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-generated": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz",
@@ -17710,6 +17907,16 @@
"minimalistic-assert": "^1.0.0"
}
},
"node_modules/web-namespaces": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
"integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
"dev": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",

View File

@@ -1,10 +1,10 @@
{
"name": "bitburner",
"license": "SEE LICENSE IN license.txt",
"version": "2.5.2",
"version": "2.6.0",
"main": "electron-main.js",
"author": {
"name": "Daniel Xie, Olivier Gagnon, et al."
"name": "Daniel Xie, hydroflame, et al."
},
"bugs": {
"url": "https://github.com/bitburner-official/bitburner-src/issues"
@@ -97,7 +97,9 @@
"typescript": "^5.2.2",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"webpack-dev-server": "^4.15.1",
"remark-math": "^5.1.1",
"rehype-mathjax": "^4.0.3"
},
"engines": {
"node": ">=14"

View File

@@ -118,7 +118,7 @@ export function AchievementList({ achievements, playerAchievements }: IProps): J
<Typography color="secondary" sx={{ mt: 1 }}>
{secret.map((item) => (
<span key={`secret_${item.achievement.ID}`}>
<CorruptableText content={item.achievement.ID}></CorruptableText>
<CorruptableText content={item.achievement.ID} spoiler={true}></CorruptableText>
<br />
</span>
))}

View File

@@ -30,6 +30,7 @@ import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { workerScripts } from "../Netscript/WorkerScripts";
import { getRecordValues } from "../Types/Record";
import { ServerConstants } from "../Server/data/Constants";
// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...
const achievementData = (<AchievementDataJson>(<unknown>data)).achievements;
@@ -232,7 +233,7 @@ export const achievements: Record<string, Achievement> = {
MAX_RAM: {
...achievementData.MAX_RAM,
Icon: "maxram",
Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,
Condition: () => Player.getHomeComputer().maxRam === ServerConstants.HomeComputerMaxRam,
},
MAX_CORES: {
...achievementData.MAX_CORES,

View File

@@ -144,8 +144,15 @@ function generateStatsDescription(mults: Multipliers, programs?: string[], start
desc += `\n-${f(-(mults.hacknet_node_purchase_cost - 1))} hacknet nodes cost`;
}
if (mults.hacknet_node_level_cost !== 1) {
desc += `\n-${f(-(mults.hacknet_node_level_cost - 1))} hacknet nodes upgrade cost`;
desc += `\n-${f(-(mults.hacknet_node_level_cost - 1))} hacknet level upgrade cost`;
}
if (mults.hacknet_node_ram_cost !== 1) {
desc += `\n-${f(-(mults.hacknet_node_ram_cost - 1))} hacknet RAM cost`;
}
if (mults.hacknet_node_core_cost !== 1) {
desc += `\n-${f(-(mults.hacknet_node_core_cost - 1))} hacknet core cost`;
}
// Bladeburner
if (mults.bladeburner_max_stamina !== 1) desc += `\n+${f(mults.bladeburner_max_stamina - 1)} Bladeburner Max Stamina`;
if (mults.bladeburner_stamina_gain !== 1) {

View File

@@ -1781,7 +1781,7 @@ export const Augmentations: Record<AugmentationName, Augmentation> = (() => {
repCost: 1e4,
moneyCost: 1e6,
info: "Penta-dynamo-neurovascular-valve inserted in the carpal ligament, enhances dexterity.",
stats: "This augmentation makes the Cheat Code minigame easier by allowing the opposite character.",
stats: "This augmentation makes the Cheat Code minigame easier by showing what character will come next.",
isSpecial: true,
factions: [FactionName.ShadowsOfAnarchy],
},

View File

@@ -96,6 +96,7 @@ export function PlayerMultipliers(): React.ReactElement {
mult: "Hacking Speed",
current: Player.mults.hacking_speed,
augmented: Player.mults.hacking_speed * mults.hacking_speed,
bnMult: currentNodeMults.HackingSpeedMultiplier,
},
{
mult: "Hacking Money",
@@ -220,6 +221,7 @@ export function PlayerMultipliers(): React.ReactElement {
mult: "Company Reputation Gain",
current: Player.mults.company_rep,
augmented: Player.mults.company_rep * mults.company_rep,
bnMult: currentNodeMults.CompanyWorkRepGain,
color: Settings.theme.combat,
},
{
@@ -240,6 +242,7 @@ export function PlayerMultipliers(): React.ReactElement {
mult: "Crime Success Chance",
current: Player.mults.crime_success,
augmented: Player.mults.crime_success * mults.crime_success,
bnMult: currentNodeMults.CrimeSuccessRate,
color: Settings.theme.combat,
},
{

View File

@@ -445,6 +445,41 @@ export function initBitNodes() {
</>
),
);
BitNodes.BitNode14 = new BitNode(
14,
1,
"IPvGO Subnet Takeover",
"Territory exists only in the 'net",
(
<>
In late 2070, the .org bubble burst, and most of the newly-implemented IPvGO 'net collapsed overnight. Since
then, various factions have been fighting over small subnets to control their computational power. These subnets
are very valuable in the right hands, if you can wrest them from their current owners. You will be opposed by
the other factions, but you can overcome them with careful choices. Prevent their attempts to destroy your
networks by controlling the open space in the 'net!
<br />
<br />
Destroying this BitNode will give you Source-File 14, or if you already have this Source-File it will upgrade
its level up to a maximum of 3. This Source-File grants the following benefits:
<br />
<br />
Level 1: 25% increased stat multipliers from Node Power
<br />
Level 2: Permanently unlocks the go.cheat API
<br />
Level 3: 25% increased success rate for the go.cheat API
<br />
<br />
This Source-File also increases the maximum favor you can gain for each faction from IPvGO by:
<br />
Level 1: +10
<br />
Level 2: +20
<br />
Level 3: +40
</>
),
);
}
export const defaultMultipliers = new BitNodeMultipliers();
@@ -909,6 +944,49 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
WorldDaemonDifficulty: 3,
});
}
case 14: {
return new BitNodeMultipliers({
GoPower: 4,
HackingLevelMultiplier: 0.4,
HackingSpeedMultiplier: 0.3,
ServerMaxMoney: 0.7,
ServerStartingMoney: 0.5,
ServerStartingSecurity: 1.5,
CrimeMoney: 0.75,
CrimeSuccessRate: 0.4,
HacknetNodeMoney: 0.25,
ScriptHackMoney: 0.3,
StrengthLevelMultiplier: 0.5,
DexterityLevelMultiplier: 0.5,
AgilityLevelMultiplier: 0.5,
AugmentationMoneyCost: 1.5,
InfiltrationMoney: 0.75,
FactionWorkRepGain: 0.2,
CompanyWorkRepGain: 0.2,
CorporationValuation: 0.4,
CorporationSoftcap: 0.9,
CorporationDivisions: 0.8,
BladeburnerRank: 0.6,
BladeburnerSkillCost: 2,
GangSoftcap: 0.7,
GangUniqueAugs: 0.4,
StaneksGiftPowerMultiplier: 0.5,
StaneksGiftExtraSize: -1,
WorldDaemonDifficulty: 5,
});
}
default: {
throw new Error("Invalid BitNodeN");
}

View File

@@ -36,6 +36,9 @@ export class BitNodeMultipliers {
/** Influences how much money the player earns when completing working their job. */
CompanyWorkMoney = 1;
/** Influences how much rep the player gains when performing work for a company. */
CompanyWorkRepGain = 1;
/** Influences the valuation of corporations created by the player. */
CorporationValuation = 1;
@@ -45,6 +48,9 @@ export class BitNodeMultipliers {
/** Influences the base money gained when the player commits a crime. */
CrimeMoney = 1;
/** influences the success chance of committing crimes */
CrimeSuccessRate = 1;
/** Influences how many Augmentations you need in order to get invited to the Daedalus faction */
DaedalusAugsRequirement = 30;
@@ -75,12 +81,18 @@ export class BitNodeMultipliers {
/** Percentage of unique augs that the gang has. */
GangUniqueAugs = 1;
/** Percentage multiplier on the effect of the IPvGO rewards **/
GoPower = 1;
/** Influences the experienced gained when hacking a server. */
HackExpGain = 1;
/** Influences how quickly the player's hacking level (not experience) scales */
HackingLevelMultiplier = 1;
/** Influences how quickly the player's hack(), grow() and weaken() calls run */
HackingSpeedMultiplier = 1;
/**
* Influences how much money is produced by Hacknet Nodes.
* Influences the hash rate of Hacknet Servers (unlocked in BitNode-9)

View File

@@ -58,6 +58,7 @@ export const BitNodeMultipliersDisplay = ({ n, level }: IProps): React.ReactElem
<CorporationMults n={n} mults={mults} />
<BladeburnerMults n={n} mults={mults} />
<StanekMults n={n} mults={mults} />
<GoMults n={n} mults={mults} />
</Box>
);
};
@@ -351,3 +352,11 @@ function CorporationMults({ mults }: IMultsProps): React.ReactElement {
return <BNMultTable sectionName="Corporation" rowData={rows} mults={mults} />;
}
function GoMults({ mults }: IMultsProps): React.ReactElement {
const rows: IBNMultRows = {
GoPower: { name: "IPvGO Node Power bonus" },
};
return <BNMultTable sectionName="IPvGO Subnet Takeover" rowData={rows} mults={mults} />;
}

View File

@@ -26,16 +26,16 @@ const useStyles = makeStyles(() =>
},
},
level0: {
color: "red",
color: Settings.theme.bnlvl0,
},
level1: {
color: "yellow",
color: Settings.theme.bnlvl1,
},
level2: {
color: "#48d1cc",
color: Settings.theme.bnlvl2,
},
level3: {
color: "blue",
color: Settings.theme.bnlvl3,
},
}),
);
@@ -241,7 +241,7 @@ export function BitverseRoot(props: IProps): React.ReactElement {
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> O | | / __| \ | | O </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> O | O | | O / | O | | O | O </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> | | | | |_/ |/ | \_ \_| | | | | </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> O | | | O | | O__/ | / \__ | | O | | | O </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> O | | | <BitNodePortal n={14} level={n(4)} flume={props.flume} destroyedBitNode={destroyed} /> | | O__/ | / \__ | | O | | | O </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}> | | | | | | | / /| O / \| | | | | | | </Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}>O | | | \| | O / _/ | / O | |/ | | | O</Typography>
<Typography sx={{lineHeight: '1em',whiteSpace: 'pre'}}>| | | |O / | | O / | O O | | \ O| | | |</Typography>

View File

@@ -1,3 +1,4 @@
import type { PromisePair } from "../Types/Promises";
import { AugmentationName, CityName, FactionName } from "@enums";
import { constructorsForReviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
import { ActionIdentifier } from "./ActionIdentifier";
@@ -42,8 +43,7 @@ export interface BlackOpsAttempt {
isAvailable?: boolean;
action?: BlackOperation;
}
export const BladeburnerResolvers: ((msProcessed: number) => void)[] = [];
export const BladeburnerPromise: PromisePair<number> = { promise: null, resolve: null };
export class Bladeburner {
numHosp = 0;
@@ -109,12 +109,23 @@ export class Bladeburner {
this.stamina = this.maxStamina;
this.create();
}
/*
just a quick fix for the broken implementation
BlackOperations are only initialized on game load with a count of 1
and are not reset on BitNode change or dev menu reset of bladeburner
*/
resetBlackOps(): void {
for (const [blackopName, blackop] of Object.entries(BlackOperations)) {
blackop.count = Number(!this.blackops[blackopName]);
}
}
getCurrentCity(): City {
return this.cities[this.city];
}
calculateStaminaPenalty(): number {
if (this.stamina === this.maxStamina) return 1;
return Math.min(1, this.stamina / (0.5 * this.maxStamina));
}
@@ -1998,6 +2009,8 @@ export class Bladeburner {
process(): void {
// Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized.
if (!Router.isInitialized) return;
//safety measure this needs to be removed in a bigger refactor
this.resetBlackOps();
// If the Player starts doing some other actions, set action to idle and alert
if (!Player.hasAugmentation(AugmentationName.BladesSimulacrum, true) && Player.currentWork) {
@@ -2085,9 +2098,11 @@ export class Bladeburner {
}
}
// Handle "nextUpdate" resolvers after this update
for (const resolve of BladeburnerResolvers.splice(0)) {
resolve(seconds * 1000);
// Handle "nextUpdate" resolver after this update
if (BladeburnerPromise.resolve) {
BladeburnerPromise.resolve(seconds * 1000);
BladeburnerPromise.resolve = null;
BladeburnerPromise.promise = null;
}
}
}
@@ -2164,6 +2179,7 @@ export class Bladeburner {
try {
this.startAction(actionId);
if (!Player.hasAugmentation(AugmentationName.BladesSimulacrum, true)) Player.finishWork(true);
workerScript.log(
"bladeburner.startAction",
() => `Starting bladeburner action with type '${type}' and name '${name}'`,
@@ -2299,11 +2315,13 @@ export class Bladeburner {
}
const skill = Skills[skillName];
if (this.skills[skillName] == null) {
return skill.calculateCost(0, count);
} else {
return skill.calculateCost(this.skills[skillName], count);
const currentLevel = this.skills[skillName] ?? 0;
if (skill.maxLvl !== 0 && currentLevel + count > skill.maxLvl) {
return Infinity;
}
return skill.calculateCost(currentLevel, count);
}
upgradeSkillNetscriptFn(skillName: string, count: number, workerScript: WorkerScript): boolean {

View File

@@ -30,7 +30,7 @@ export function BlackOpPage(props: IProps): React.ReactElement {
</Typography>
{props.bladeburner.blackops[BlackOperationName.OperationDaedalus] ? (
<Button sx={{ my: 1, p: 1 }} onClick={() => Router.toPage(Page.BitVerse, { flume: false, quick: false })}>
<CorruptableText content="Destroy w0rld_d34mon"></CorruptableText>
<CorruptableText content="Destroy w0rld_d34mon" spoiler={false}></CorruptableText>
</Button>
) : (
<BlackOpList bladeburner={props.bladeburner} />

View File

@@ -31,10 +31,11 @@ export function StartButton(props: IProps): React.ReactElement {
}
function onStart(): void {
if (disabled) return;
props.bladeburner.action.type = props.type;
props.bladeburner.action.name = props.name;
const action = new ActionIdentifier();
action.type = props.type;
action.name = props.name;
if (!Player.hasAugmentation(AugmentationName.BladesSimulacrum, true)) Player.finishWork(true);
props.bladeburner.startAction(props.bladeburner.action);
props.bladeburner.startAction(action);
props.rerender();
}

View File

@@ -47,13 +47,15 @@ export function generateRandomContractOnHome(): void {
serv.addContract(contract);
}
export const generateDummyContract = (problemType: string): void => {
export const generateDummyContract = (problemType: string): string => {
if (!CodingContractTypes[problemType]) throw new Error(`Invalid problem type: '${problemType}'`);
const serv = Player.getHomeComputer();
const contractFn = getRandomFilename(serv);
const contract = new CodingContract(contractFn, problemType, null);
serv.addContract(contract);
return contractFn;
};
interface IGenerateContractParams {

View File

@@ -12,8 +12,6 @@ export const CONSTANTS: {
OfflineHackingIncome: number;
CorpFactionRepRequirement: number;
BaseFocusBonus: number;
BaseCostFor1GBOfRamHome: number;
BaseCostFor1GBOfRamServer: number;
TravelCost: number;
BaseFavorToDonate: number;
DonateMoneyToRepDivisor: number;
@@ -23,13 +21,6 @@ export const CONSTANTS: {
CompanyReputationToFavorMult: number;
NeuroFluxGovernorLevelMult: number;
NumNetscriptPorts: number;
HomeComputerMaxRam: number;
ServerBaseGrowthRate: number;
ServerMaxGrowthRate: number;
ServerFortifyAmount: number;
ServerWeakenAmount: number;
PurchasedServerLimit: number;
PurchasedServerMaxRam: number;
MultipleAugMultiplier: number;
TorRouterCost: number;
HospitalCostPerHp: number;
@@ -84,9 +75,9 @@ export const CONSTANTS: {
Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG
LatestUpdate: string;
} = {
VersionString: "2.5.2",
VersionString: "2.6.0",
isDevBranch: false,
VersionNumber: 37,
VersionNumber: 38,
/** 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
@@ -103,10 +94,6 @@ export const CONSTANTS: {
// How much reputation is needed to join a megacorporation's faction
CorpFactionRepRequirement: 400e3,
// Base RAM costs
BaseCostFor1GBOfRamHome: 32000,
BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM
// Cost to travel to another city
TravelCost: 200e3,
@@ -123,16 +110,6 @@ export const CONSTANTS: {
NumNetscriptPorts: Number.MAX_SAFE_INTEGER,
// Server-related constants
HomeComputerMaxRam: 1073741824, // 2 ^ 30
ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate
ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)
ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown
ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened
PurchasedServerLimit: 25,
PurchasedServerMaxRam: 1048576, // 2^20
// Augmentation Constants
MultipleAugMultiplier: 1.9,
@@ -219,57 +196,90 @@ export const CONSTANTS: {
InfiniteLoopLimit: 2000,
Donations: 113,
Donations: 151,
// Also update doc/source/changelog.rst
LatestUpdate: `
## v2.5.2 - 26 December 2023
## v2.6.0 - IPvGO: 5 Mar 2024
### MAJOR ADDITIONS
- A new minigame IPvGO, based on the game Go. Visit DefComm in New Tokyo or the CIA in Sector-12 for access. Documentation for the mechanic is available ingame under "How to Play" once the mechanic is available. (@ficocelliguy)
- A new BitNode has been added which focuses on the IPvGO mechanic (@ficocelliguy)
### API
- Added limit of 1e9 for additionalMsec property of HGWOptions (@d0sboots)
- ns.share effect is now boosted by host server core count (@TheAimMan)
- Fix a bug with HGWOptions that caused the default value to be 1 thread even for scripts running multiple threads (@DJMatch3000)
- (Singularity) ns.singularity.applyToCompany now returns the JobName if a job was obtained, or null otherwise - previously was boolean (@jjclark1982)
- (Singularity) ns.singularity.getCurrentWork now requires access to the singularity API (@TheAimMan)
- (Singularity) Added ns.singularity.getFactionInviteRequirements (@jjclark1982)
- (Stanek) ns.stanek.chargeFragment is now boosted by host server core count (@TheAimMan)
### BUGFIX
- (Bladeburner) Operation team size modal now handles keyboard submission correctly (@Snarling)
- (Corporation) Fixed an issue with Warehouse size being out of sync following prduct sale (@Kelenius)
- (Factions) Fixed some display order issues, and possible multiple entries for a faction (@jjclark1982)
- (Factions) Fixed an issue with certain factions not becoming "known" when joining them (@jjclark1982)
- (Grafting) Entropy now has the correct negative effect on hacknet multipliers (@TheAimMan)
- (Hashnet) Fixed an issue where the SF9.3 reward server had an incorrect number of cores (@cigarmemr)
- (Terminal) Fixed a bug with script autocompletion when the script is inside a subdirectory (@draughtnyan)
### MISC
- Added basic protection for certain global values that could cause a recovery screen if reassigned (@Snarling)
- Fixed conditions for an easter egg message (@cigarmemr)
- (Bitverse) Changed listed difficulty for BN3 to "hard"
- (CodingContract) Reduce incidence of $0 coding contract rewards in circumstances where the reward would be $0 (@trambelus)
- (Corporation) Added better accounting of funds transactions (@jjclark1982)
- (Corporation) Remove cooldown on starting over corporation, but maintain remaining cooldown for selling shares (@jjclark1982)
- (Corporation) Removed some legacy code that was not doing anything (@catloversg)
- (DevMenu) Added the ability to add/remove sleeves from the dev menu (@Sphyxis, @Snarling)
- (Docs) Fixed various typos in documentation (@tdpeuter)
- (Factions) Added a documentation page for faction join requirements (@jjclark1982)
- (Formulas) Added clarification for the unit of time returned by hackTime, growTime, and weakenTime functions (@d0sboots)
- (Ports) Promises from port.nextWrite resolve in the same order they were created, instead of reverse order (@LJNeon)
- (Sleeve) Add task counters for Crime and Bladeburner tasks (@TheAimMan)
- (Stock) Add some randomization to timing for stockmarket forecast change events (@Caldwell-74)
- (Terminal) Added the --all option for unalias, to allow removing all aliases (@Sphyxis)
- Nerf noodle bar (various contributors)
- (Bladeburner) ns.bladeburner.getSkillUpgradeCost now returns infinity if requesting a cost above the maximum skill level (@Semanual)
- (CodingContract) Fixed an issue where ns.codingcontract.getData was leaking internal arrays when contract data was a 2-d array (@LJNeon)
- (CodingContract) ns.codingcontract.createDummyContract now returns the filename of the created contract (@Spartelfant)
- (Gang) Added ns.gang.getInstallResult for determining the effect an augmentation install will have on gang member ascension multipliers (@LJNeon)
- (Go) Added the ns.go API, which allows interaction with the new IPvGO mechanic. While this is in development, the API may undergo changes (@ficocelliguy)
- (Hashnet) Fixed a bug that allowed spending negative hashes (@yichizhng)
- (Ports) Added ns.nextPortWrite, which allows waiting for the next write to a port without creating a port handle object (@LJNeon)
- (Ports) Ports now support all clonable data (@LJNeon)
- (Singularity) Add type information for ns.singularity.getCurrentWork return value (@Semanual)
- (Stanek) Fix ns.stanek.acceptGift which was not working in 2.5.2 (@jjclark1982)
- ns.getPlayer now also provides the player's karma. ns.heart.break is no longer a hidden function (@LJNeon)
- ns.atExit can be provided a string id as a second parameter, to set multiple atExit callbacks for the same script (@shyguy1412)
- Improved the efficiency and accuracy of growth formulas (@d0sboots)
- ns.formatNumber now throws an error if specifying a suffixStart less than 1000 (@TheAimMan)
- HGWOptions now accepts a non-integer number of threads (@Caldwell-74)
- Fixed outdated docs for ns.spawn() (@adeilt)
- Fixed ns.serverExists returning incorrect value for an endgame server (@cigarmemr)
- Refactored weaken effect calculation (@Caldwell-74)
### UI
- Message for buying TOR router no longer implies the need to connect to darkweb (@Kelenius)
- (Company) Rework of the job location details (@jjclark1982)
- (Company) Added previous/next buttons for job location if the player has multiple jobs (@Kelenius)
- (Factions) Only show warning about enemy factions for factions with enemies (@jjclark1982)
- (Stanek) Improved the display of the Stanek grid (@Kelenius)
- (Augmentations) Fixed some missing description text for Hacknet multipliers (@jjclark1982)
- (Corporation) Align columns correctly in warehouse breakdown table (@jjclark1982)
- (Corporation) Several typo fixes in Corporation modals (@cigarmemr)
- (Documentation) Ingame documentation now displays line breaks inside tables correctly (@Snarling)
- (Documentation) Added a documentation page for converting .script to .js (@LJNeon, @jjclark1982, @Snarling)
- (Documentation) Script editor doc button points to correct docs (@LJNeon)
- (Hashnet) Hash upgrade descriptions use proper number formatting options (@Snarling)
- (Hacknet) Hacknet display shows a dynamic amount of columns based on screen width (@shyguy1412)
- (Infiltration) Changed how the CheatCodeGame is displayed (@alutman, @Snarling)
- (Infiltration) If currently performing faction work, UI defaults to trading info for rep with that faction (@LJNeon)
- (Sleeve) If intelligence is unlocked, sleeve intelligence is shown in the UI (@Caldwell-74)
- (Stockmarket) Changed color of stocks increasing in value (@Semanual)
- (Terminal) Improved scroll behavior on the Terminal (@Snarling)
- (Theme) Added 3 new theme elements to properly support light themes (@adeilt)
- Added a tail render interval setting, changing how frequently tail windows redraw their contents (@Caldwell-74)
- Reorganization of some content and sorting of scripts on the Active Scripts page (@Snarling, @TheAimMan)
- "Disable Text Effects" option also disables the corrupted text display (@draughtnyan)
- fl1ght.exe now displays the related requirements in a more readable way (@TheAimMan, @LJNeon)
- Miscellaneous wording fixes (@cigarmemr)
### MISC
- (CodingContract) Improve parsing of player input for arrays in coding contracts (@rocket3989)
- (Corporation) Fix an incorrect demand range for Minerals (@catloversg)
- (Corporation) Added ingame documentation (@catloversg)
- (Corporation) Divisions impact on corporation valuation is now based on number of offices and warehouses (@catloversg)
- (Corporation) Improve performance of calculations (@catloversg)
- (Bladeburner) Band-aid fix Blops count and action stopping (@Caldwell-74)
- (Gang) Add separate money tracking for gang expenses (@deansvendsen)
- (Ports) Port objects no longer track a separate promise for every use of nextWrite (@Snarling)
- (Ports) Fixed a crashing bug related to the changes above (@Jman420)
- (RemoteAPI) Remote API can be targeted to a remote device instead of the default of localhost (@Specker)
- (RemoteAPI) Added a getAllServers method (@shyguy1412)
- (ScriptEditor) When importing from other files that are also open in the editor, type information is now available in the IDE (@shyguy1412)
- (ScriptEditor) Links from "ls" are now tied to that host, instead of your connected machine (@LJNeon)
- (ScriptEditor) Script "models" in the script editor are now properly disposed (@Caldwell-74)
- (Terminal) Add --ram-override flag to the run command (@LJNeon)
- (Terminal) Fix incorrect help text for rm command (@LJNeon)
- Add a helper for clamping numbers to an allowable range, and use this for player skill formulas (@Caldwell-74)
- Protect against renaming servers to invalid names (@LJNeon)
- All running scripts are killed upon entering the BitVerse (@LJNeon)
- Scripts with the "temporary" flag set do not populate the Recently Killed script list on script death (@TheAimMan)
- Fix an issue with offline income for scripts (@Caldwell-74)
- Various "nextUpdate" promises are not tracked internally as a single promise instead of an array of promises (@Caldwell-74, @LJNeon)
- Fix inconsistent importing of the arg library (@catloversg)
- Clarify some information in the CONTRIBUTING.md file (@deansvendsen)
- Internal changes to method used for cloning objects (@LJNeon)
- Rearrange some internal constants (@Caldwell-74)
- b1t_flum3.exe can be ran in "quick" mode (@TheAimMan)
- Nerf noodle bar (various)
- Nerf noodle bar moar (@Caldwell-74)
`,
};

View File

@@ -43,14 +43,16 @@ export function NewDivision(corporation: Corporation, industry: IndustryType, na
type: industry,
}),
);
corporation.numberOfOfficesAndWarehouses += 2;
}
}
export function removeDivision(corporation: Corporation, name: string): number {
const division = corporation.divisions.get(name);
if (!division) throw new Error("There is no division called " + name);
const price = division.calculateRecoupableValue();
corporation.divisions.delete(name);
corporation.numberOfOfficesAndWarehouses -= getRecordValues(division.offices).length;
corporation.numberOfOfficesAndWarehouses -= getRecordValues(division.warehouses).length;
// We also need to remove any exports that were pointing to the old division
for (const otherDivision of corporation.divisions.values()) {
@@ -63,6 +65,7 @@ export function removeDivision(corporation: Corporation, name: string): number {
}
}
}
const price = division.calculateRecoupableValue();
corporation.gainFunds(price, "division");
return price;
}
@@ -79,6 +82,7 @@ export function purchaseOffice(corporation: Corporation, division: Division, cit
city: city,
size: corpConstants.officeInitialSize,
});
++corporation.numberOfOfficesAndWarehouses;
}
export function IssueDividends(corporation: Corporation, rate: number): void {
@@ -397,6 +401,7 @@ export function purchaseWarehouse(corp: Corporation, division: Division, city: C
loc: city,
size: corpConstants.warehouseInitialSize,
});
++corp.numberOfOfficesAndWarehouses;
}
export function UpgradeWarehouseCost(warehouse: Warehouse, amt: number): number {

View File

@@ -1,3 +1,4 @@
import type { PromisePair } from "../Types/Promises";
import { Player } from "@player";
import { CorpStateName, InvestmentOffer } from "@nsdefs";
import { CorpUnlockName, CorpUpgradeName, LiteratureName } from "@enums";
@@ -18,8 +19,9 @@ import { JSONMap, JSONSet } from "../Types/Jsonable";
import { formatMoney } from "../ui/formatNumber";
import { isPositiveInteger } from "../types";
import { createEnumKeyedRecord, getRecordValues } from "../Types/Record";
import { getKeyList } from "../utils/helpers/getKeyList";
export const CorporationResolvers: ((prevState: CorpStateName) => void)[] = [];
export const CorporationPromise: PromisePair<CorpStateName> = { promise: null, resolve: null };
interface ICorporationParams {
name?: string;
@@ -71,6 +73,9 @@ export class Corporation {
state = new CorporationState();
// This is used for calculating cycle valuation.
numberOfOfficesAndWarehouses = 0;
constructor(params: ICorporationParams = {}) {
this.name = params.name || "The Corporation";
this.seedFunded = params.seedFunded ?? false;
@@ -175,9 +180,11 @@ export class Corporation {
this.state.incrementState();
// Handle "nextUpdate" resolvers after this update
for (const resolve of CorporationResolvers.splice(0)) {
resolve(state);
// Handle "nextUpdate" resolver after this update
if (CorporationPromise.resolve) {
CorporationPromise.resolve(state);
CorporationPromise.resolve = null;
CorporationPromise.promise = null;
}
}
}
@@ -203,14 +210,16 @@ export class Corporation {
}
val = this.funds + assetDelta * 85e3;
val *= Math.pow(1.1, this.divisions.size);
// Math.pow(1.1, 1 / 12) = 1.0079741404289038
val *= Math.pow(1.0079741404289038, this.numberOfOfficesAndWarehouses);
val = Math.max(val, 0);
} else {
val = 10e9 + this.funds / 3;
if (assetDelta > 0) {
val += assetDelta * 315e3;
}
val *= Math.pow(1.1, this.divisions.size);
// Math.pow(1.1, 1 / 12) = 1.0079741404289038
val *= Math.pow(1.0079741404289038, this.numberOfOfficesAndWarehouses);
val -= val % 1e6; //Round down to nearest million
}
if (val < 10e9) val = 10e9; // Base valuation
@@ -452,14 +461,23 @@ export class Corporation {
return;
}
// Exclude numberOfOfficesAndWarehouses
static includedProperties = getKeyList(Corporation, { removedKeys: ["numberOfOfficesAndWarehouses"] });
/** Serialize the current object to a JSON save state. */
toJSON(): IReviverValue {
return Generic_toJSON("Corporation", this);
return Generic_toJSON("Corporation", this, Corporation.includedProperties);
}
/** Initializes a Corporation object from a JSON save state. */
static fromJSON(value: IReviverValue): Corporation {
return Generic_fromJSON(Corporation, value.data);
const corporation = Generic_fromJSON(Corporation, value.data, Corporation.includedProperties);
// numberOfOfficesAndWarehouses is not in the included properties and must be calculated
for (const division of corporation.divisions.values()) {
corporation.numberOfOfficesAndWarehouses += getRecordValues(division.offices).length;
corporation.numberOfOfficesAndWarehouses += getRecordValues(division.warehouses).length;
}
return corporation;
}
}

View File

@@ -28,7 +28,7 @@ export const MaterialInfo: Record<CorpMaterialName, CorpMaterialConstantData> =
name: "Minerals",
size: 0.04,
demandBase: 75,
demandRange: [90, 60],
demandRange: [60, 90],
competitionBase: 80,
competitionRange: [65, 95],
baseCost: 500,

View File

@@ -22,6 +22,7 @@ import { purchaseWarehouse } from "../Actions";
import { useCorporation, useDivision } from "./Context";
import { gameCyclesPerCorpStateCycle } from "../data/Constants";
import { ButtonWithTooltip } from "../../ui/Components/ButtonWithTooltip";
import { StatsTable } from "../../ui/React/StatsTable";
interface WarehouseProps {
corp: Corporation;
@@ -95,25 +96,21 @@ function WarehouseRoot(props: WarehouseProps): React.ReactElement {
}
}
const breakdownItems: string[] = [];
const breakdownItems: string[][] = [];
for (const matName of corpConstants.materialNames) {
const mat = props.warehouse.materials[matName];
if (mat.stored === 0) continue;
breakdownItems.push(`${matName}: ${formatMaterialSize(mat.stored * MaterialInfo[matName].size)}`);
breakdownItems.push([`${matName}:`, `${formatMaterialSize(mat.stored * MaterialInfo[matName].size)}`]);
}
for (const [prodName, product] of division.products) {
breakdownItems.push(
`${prodName}: ${formatMaterialSize(product.cityData[props.currentCity].stored * product.size)}`,
);
breakdownItems.push([
`${prodName}:`,
`${formatMaterialSize(product.cityData[props.currentCity].stored * product.size)}`,
]);
}
let breakdown;
if (breakdownItems.length > 0) {
breakdown = breakdownItems.map((item, i) => <p key={i}>{item}</p>);
} else {
breakdown = <>No items in storage.</>;
}
const breakdown = breakdownItems.length > 0 ? <StatsTable rows={breakdownItems} /> : <>No items in storage.</>;
return (
<Paper>

View File

@@ -144,7 +144,7 @@ export function PurchaseMaterialModal(props: IProps): React.ReactElement {
<Typography>
Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes
constantly.
{props.disablePurchaseLimit ? "Note: Purchase amount is disabled as smart supply is enabled" : ""}
{props.disablePurchaseLimit ? " Note: Purchase amount is disabled as smart supply is enabled" : ""}
</Typography>
<TextField
value={buyAmt}

View File

@@ -2,6 +2,8 @@ import React, { useState } from "react";
import { Modal } from "../../../ui/React/Modal";
import { Money } from "../../../ui/React/Money";
import { MoneyRate } from "../../../ui/React/MoneyRate";
import { StatsTable } from "../../../ui/React/StatsTable";
import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import MenuItem from "@mui/material/MenuItem";
@@ -34,7 +36,7 @@ export function SellDivisionModal(props: IProps): React.ReactElement {
props.onClose();
dialogBoxCreate(
<Typography>
Sold <b>{divisionToSell.name}</b> for <Money money={soldPrice} />, you now have space for
Sold <b>{divisionToSell.name}</b> for <Money money={soldPrice} />, you now have space for{" "}
{corp.maxDivisions - corp.divisions.size} more divisions.
</Typography>,
);
@@ -56,12 +58,20 @@ export function SellDivisionModal(props: IProps): React.ReactElement {
))}
</Select>
<Typography>Division {divisionToSell.name} has:</Typography>
<Typography>
Profit: <Money money={(divisionToSell.lastCycleRevenue - divisionToSell.lastCycleExpenses) / 10} /> / sec{" "}
</Typography>
<Typography>Cities:{getRecordKeys(divisionToSell.offices).length}</Typography>
<Typography>Warehouses:{getRecordKeys(divisionToSell.warehouses).length}</Typography>
{divisionToSell.makesProducts ?? <Typography>Products: {divisionToSell.products.size}</Typography>}
<StatsTable
rows={[
[
"Profit:",
<MoneyRate
key="profit"
money={(divisionToSell.lastCycleRevenue - divisionToSell.lastCycleExpenses) / 10}
/>,
],
["Cities:", getRecordKeys(divisionToSell.offices).length],
["Warehouses:", getRecordKeys(divisionToSell.warehouses).length],
divisionToSell.makesProducts ? ["Products:", divisionToSell.products.size] : [],
]}
/>
<br />
<Typography>
Sell price: <Money money={price} />

Some files were not shown because too many files have changed in this diff Show More