Compare commits

..

36 Commits

Author SHA1 Message Date
Snarling
de5ebc993b RELEASE: 2.4.1 (#752) 2023-08-26 18:07:09 -04:00
zornlemma
aaaa980d10 fix: ActiveScripts Page map scripts with same arguments correctly (#748) 2023-08-25 15:03:08 -04:00
Michael Ficocelli
7b05bed0d4 FIX: update white-space style to function on electron app (#745) 2023-08-23 17:11:27 -04:00
omuretsu
42d70506cc Fix urls for ctrl-clicking documentation links 2023-08-21 22:48:57 -04:00
omuretsu
d5525f39bc Update changelog (probably last iteration of 2.4.1dev) 2023-08-21 06:56:11 -04:00
Michael Ficocelli
86b0bd5ac7 TERMINAL: Add option for partial history search (#736) 2023-08-21 06:50:17 -04:00
Zelow79
7ea0725a39 UI: Fixed Preview for 2 themes (#737)
Noticed 2 themes had preview screenshots that weren't from a fresh save.
2023-08-19 15:42:01 -04:00
omuretsu
fbdd8aee58 changelog update 2023-08-16 17:47:32 -04:00
missymae#2783
633f3ef07e UI: BladeBurner successes to next level tooltip fix (#728) 2023-08-16 17:32:04 -04:00
Zelow79
b7ad3395ae API: Added CompanyName to NetscriptDefinitions (#731) 2023-08-16 17:31:41 -04:00
missymae#2783
7500ef0da2 DOCUMENTATION: ns.share and getSharePower definition updates (#734) 2023-08-16 17:08:55 -04:00
Zelow79
cef452d35e add new theme zerenity (#722)
Added a calm purple and grey theme with some vivid colors here and there.
2023-08-07 02:41:01 -04:00
Snarling
4ca598defb API: Fix removed functions (#720) 2023-08-07 02:38:38 -04:00
omuretsu
d637828759 Changelog update 2023-08-06 09:42:36 -04:00
Caldwell
5c7b30ef15 BUGFIX: fix NFG buying current Level instead of next Level (#718) 2023-08-06 09:24:04 -04:00
myCatsName
647b78c9f7 CCT: accept IP solutions with matched single or double quotes, or none (#712) 2023-08-06 09:13:01 -04:00
omuretsu
c4fe88e0c7 Update changelog 2023-08-06 00:13:07 -04:00
hydroflame
931d7e588a Remove more rtd references (#702) 2023-08-06 00:05:03 -04:00
myCatsName
aed01b0979 NETSCRIPT: added ns.singularity.getAugmentationFactions (#706) 2023-08-06 00:04:36 -04:00
myCatsName
9e55d00b4f UI: "Contract in Progress" window can no longer get lost (#716) 2023-08-05 23:48:00 -04:00
myCatsName
6b7cab6ac4 IssueNewShares Modal spacing typo fix (#715) 2023-08-05 20:58:26 -04:00
myCatsName
2e84512881 update helper message for killall (#709) 2023-08-05 20:26:37 -04:00
hydroflame
2c0f7f1eda Merge pull request #694 from bitburner-official/moreResetInfo
NETSCRIPT: Add owned aug and SF info to getResetInfo
2023-08-01 09:45:50 -04:00
omuretsu
e5b1fd6b58 Fix wiregame, update changlog
WireGame had been reworked to refer to wires using their index, not the wire number, but the aug highlight display was still referring to the wire number, leading to an off-by-one.
2023-08-01 02:42:43 -04:00
omuretsu
3ced0575a4 Generate doc 2023-08-01 01:53:10 -04:00
omuretsu
75579a2ff1 Add owned aug and SF info to getResetInfo 2023-08-01 01:40:30 -04:00
Snarling
83b7c380ff DOCUMENTATION: Better npm run doc, plus minor folder reorganization (#693) 2023-08-01 00:59:33 -04:00
omuretsu
e624db5238 Update changelog 2023-07-31 23:13:38 -04:00
Snarling
1c6369ffa4 NETSCRIPT: Add ns.stock.getConstants (#692) 2023-07-31 23:08:42 -04:00
Caldwell
a85efbc4da STOCKMARKET: Move and Reorganize Constants (#688) 2023-07-31 22:12:49 -04:00
omuretsu
e9bbe57902 Changelog update 2023-07-31 10:38:13 -04:00
omuretsu
888e5f9c8a Fix bug with sleeve.setToFactionWork
Function was not checking that the player was actually in the faction, which allowed sleeves to work for factions the player was not part of.
2023-07-31 10:36:24 -04:00
omuretsu
e7312d97e6 Start 2.4.1 dev
* Set isDevBranch back to true
* Updated version number
* Updated changelog in constants
2023-07-31 04:40:46 -04:00
omuretsu
fc86895c30 Some quick 2.4.0 fixes
* No longer tells player it is a dev version and shows changelog every load
* Updated snapshot for player save format continuity test (changed due to number of donations changing)
* Fixed some display issues surrounding augmentations page (newlines were not displaying in tooltip, and NFG is sorted at the top again)
2023-07-31 04:26:15 -04:00
Your Name
1e0d3a7747 Merge branch 'dev' of github.com:bitburner-official/bitburner-src into dev 2023-07-30 22:08:44 -04:00
Your Name
b4836e5329 v2.4.0 2023-07-30 22:08:36 -04:00
137 changed files with 1028 additions and 438 deletions

View File

@@ -6,15 +6,14 @@
Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game)
that revolves around hacking and cyberpunk themes.
The game can be played at https://danielyxie.github.io/bitburner/ (release build), https://bitburner-official.github.io/bitburner-src/ (development build), or installed through [Steam](https://store.steampowered.com/app/1812820/Bitburner/).
The game can be played at https://bitburner-official.github.io/ (release build), https://bitburner-official.github.io/bitburner-src/ (development build), or installed through [Steam](https://store.steampowered.com/app/1812820/Bitburner/).
The location of the release build may change in the near future.
See the [frequently asked questions](./doc/FAQ.md) for more information . To discuss the game or get help, join the [official Discord server](https://discord.gg/TFc3hKD).
# Documentation
The game's official documentation can be found on [Read The
Docs](http://bitburner-official.readthedocs.io/). Please note that this is still a work-in-progress.
The game's official documentation can be found in-game.
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).

View File

@@ -60,12 +60,8 @@ called `npm` is installed as well.
Not all code contributions will be accepted. The safest way to ensure
that you don't waste time working on something that gets rejected is to
run your idea(s)/plan(s) past [danielyxie](https://github.com/danielyxie) first.
You can contact him through:
- Github
- Discord
- [Reddit](https://www.reddit.com/user/chapt3r/)
run your idea(s)/plan(s) past the developpers first.
You can contact him through Discord.
Otherwise, here are some general guidelines for determining what types of
changes are okay to contribute:
@@ -217,9 +213,8 @@ the following rules:
## As a Documenter
To contribute to and view your changes to the BitBurner documentation on [Read The
Docs](http://bitburner.readthedocs.io/), you will
need to have Python installed, along with [Sphinx](http://www.sphinx-doc.org).
To contribute to and view your changes to the BitBurner documentation in-game, you will
need to edit the files in [this folder](https://github.com/bitburner-official/bitburner-src/tree/dev/src/Documentation/doc)
To make change to the [in-game documentation](../markdown/bitburner.md), you will need to modify the [TypeScript definitions](../src/ScriptEditor/NetscriptDefinitions.d.ts), not the Markdown files.
@@ -234,8 +229,6 @@ rules:
- Rebase your branch if necessary.
- When submitting the pull request, make sure that the base fork is
_bitburner-official/bitburner-src_ and the base is _dev_.
- Do not check in any generated files under `doc\`. The documentation is built
automatically by ReadTheDocs.
## Deploying a new version

View File

@@ -1,6 +1,6 @@
{
"name": "bitburner",
"version": "2.3.2dev",
"version": "2.4.1",
"description": "A cyberpunk-themed programming incremental game",
"main": "main.js",
"author": "Daniel Xie, Olivier Gagnon, et al.",

View File

@@ -0,0 +1,57 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyName](./bitburner.companyname.md)
## CompanyName enum
Names of all companies
**Signature:**
```typescript
declare enum CompanyName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| AeroCorp | <code>&quot;AeroCorp&quot;</code> | |
| AlphaEnterprises | <code>&quot;Alpha Enterprises&quot;</code> | |
| BachmanAndAssociates | <code>&quot;Bachman &amp; Associates&quot;</code> | |
| BladeIndustries | <code>&quot;Blade Industries&quot;</code> | |
| CarmichaelSecurity | <code>&quot;Carmichael Security&quot;</code> | |
| CIA | <code>&quot;Central Intelligence Agency&quot;</code> | |
| ClarkeIncorporated | <code>&quot;Clarke Incorporated&quot;</code> | |
| CompuTek | <code>&quot;CompuTek&quot;</code> | |
| DefComm | <code>&quot;DefComm&quot;</code> | |
| DeltaOne | <code>&quot;DeltaOne&quot;</code> | |
| ECorp | <code>&quot;ECorp&quot;</code> | |
| FoodNStuff | <code>&quot;FoodNStuff&quot;</code> | |
| FourSigma | <code>&quot;Four Sigma&quot;</code> | |
| FulcrumTechnologies | <code>&quot;Fulcrum Technologies&quot;</code> | |
| GalacticCybersystems | <code>&quot;Galactic Cybersystems&quot;</code> | |
| GlobalPharmaceuticals | <code>&quot;Global Pharmaceuticals&quot;</code> | |
| HeliosLabs | <code>&quot;Helios Labs&quot;</code> | |
| IcarusMicrosystems | <code>&quot;Icarus Microsystems&quot;</code> | |
| JoesGuns | <code>&quot;Joe's Guns&quot;</code> | |
| KuaiGongInternational | <code>&quot;KuaiGong International&quot;</code> | |
| LexoCorp | <code>&quot;LexoCorp&quot;</code> | |
| MegaCorp | <code>&quot;MegaCorp&quot;</code> | |
| NetLinkTechnologies | <code>&quot;NetLink Technologies&quot;</code> | |
| NoodleBar | <code>&quot;Noodle Bar&quot;</code> | |
| NovaMedical | <code>&quot;Nova Medical&quot;</code> | |
| NSA | <code>&quot;National Security Agency&quot;</code> | |
| NWO | <code>&quot;NWO&quot;</code> | |
| OmegaSoftware | <code>&quot;Omega Software&quot;</code> | |
| OmniaCybersystems | <code>&quot;Omnia Cybersystems&quot;</code> | |
| OmniTekIncorporated | <code>&quot;OmniTek Incorporated&quot;</code> | |
| Police | <code>&quot;Aevum Police Headquarters&quot;</code> | |
| RhoConstruction | <code>&quot;Rho Construction&quot;</code> | |
| SolarisSpaceSystems | <code>&quot;Solaris Space Systems&quot;</code> | |
| StormTechnologies | <code>&quot;Storm Technologies&quot;</code> | |
| SysCoreSecurities | <code>&quot;SysCore Securities&quot;</code> | |
| UniversalEnergy | <code>&quot;Universal Energy&quot;</code> | |
| VitaLife | <code>&quot;VitaLife&quot;</code> | |
| WatchdogSecurity | <code>&quot;Watchdog Security&quot;</code> | |

View File

@@ -34,12 +34,10 @@ declare enum JobName
| IT3 | <code>&quot;Systems Administrator&quot;</code> | |
| networkEng0 | <code>&quot;Network Engineer&quot;</code> | |
| networkEng1 | <code>&quot;Network Administrator&quot;</code> | |
| security0 | <code>&quot;Police Officer&quot;</code> | |
| security1 | <code>&quot;Police Chief&quot;</code> | |
| security2 | <code>&quot;Security Guard&quot;</code> | |
| security3 | <code>&quot;Security Officer&quot;</code> | |
| security4 | <code>&quot;Security Supervisor&quot;</code> | |
| security5 | <code>&quot;Head of Security&quot;</code> | |
| security0 | <code>&quot;Security Guard&quot;</code> | |
| security1 | <code>&quot;Security Officer&quot;</code> | |
| security2 | <code>&quot;Security Supervisor&quot;</code> | |
| security3 | <code>&quot;Head of Security&quot;</code> | |
| securityEng | <code>&quot;Security Engineer&quot;</code> | |
| software0 | <code>&quot;Software Engineering Intern&quot;</code> | |
| software1 | <code>&quot;Junior Software Engineer&quot;</code> | |

View File

@@ -9,6 +9,7 @@
| Enumeration | Description |
| --- | --- |
| [CityName](./bitburner.cityname.md) | Names of all cities |
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
| [CrimeType](./bitburner.crimetype.md) | |
| [FactionWorkType](./bitburner.factionworktype.md) | |
| [GymType](./bitburner.gymtype.md) | |
@@ -98,6 +99,7 @@
| [SleevePerson](./bitburner.sleeveperson.md) | |
| [SourceFileLvl](./bitburner.sourcefilelvl.md) | |
| [Stanek](./bitburner.stanek.md) | Stanek's Gift API. |
| [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) |
| [TailProperties](./bitburner.tailproperties.md) | |

View File

@@ -4,7 +4,7 @@
## NS.getSharePower() method
Calculate your share power. Based on all the active share calls.
Share Power has a multiplicative effect on rep/second while doing work for a faction. Share Power increases incrementally for every thread of share running on your server network, but at a sharply decreasing rate.
**Signature:**

View File

@@ -26,7 +26,6 @@ export async function main(ns) {
await ns.hack('n00dles');
}
```
[ns2 in-game docs](https://bitburner-official.readthedocs.io/en/latest/netscript/netscriptjs.html) <hr> For (deprecated) .script usage, see: [ns1 in-game docs](https://bitburner-official.readthedocs.io/en/latest/netscript/netscript1.html) <hr>
## Properties
@@ -108,7 +107,7 @@ export async function main(ns) {
| [getServerRequiredHackingLevel(host)](./bitburner.ns.getserverrequiredhackinglevel.md) | Returns the required hacking level of the target server. |
| [getServerSecurityLevel(host)](./bitburner.ns.getserversecuritylevel.md) | Get server security level. |
| [getServerUsedRam(host)](./bitburner.ns.getserverusedram.md) | Get the used RAM on a server. |
| [getSharePower()](./bitburner.ns.getsharepower.md) | Calculate your share power. Based on all the active share calls. |
| [getSharePower()](./bitburner.ns.getsharepower.md) | Share Power has a multiplicative effect on rep/second while doing work for a faction. Share Power increases incrementally for every thread of share running on your server network, but at a sharply decreasing rate. |
| [getTimeSinceLastAug()](./bitburner.ns.gettimesincelastaug.md) | Returns the amount of time in milliseconds that have passed since you last installed Augmentations. |
| [getTotalScriptExpGain()](./bitburner.ns.gettotalscriptexpgain.md) | Get the exp gain of all scripts. |
| [getTotalScriptIncome()](./bitburner.ns.gettotalscriptincome.md) | Get the income of all scripts. |

View File

@@ -19,5 +19,5 @@ Promise&lt;void&gt;
RAM cost: 2.4 GB
Increases your rep gain of all faction work types while share is called. Scales with thread count.
Increases rep/second for all faction work while share is running. Each cycle of ns.share() is 10 seconds. Scales with thread count, but at a sharply decreasing rate.

View File

@@ -17,7 +17,8 @@ export type NSEnums = {
LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant;
UniversityClassType: typeof UniversityClassType;
CompanyName: typeof CompanyName;
};
```
**References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md)
**References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md)<!-- -->, [CompanyName](./bitburner.companyname.md)

View File

@@ -7,5 +7,5 @@
**Signature:**
```typescript
jobs: Record<string, string>;
jobs: Partial<Record<CompanyName, JobName>>;
```

View File

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

View File

@@ -19,4 +19,6 @@ interface ResetInfo
| [currentNode](./bitburner.resetinfo.currentnode.md) | | number | The current bitnode |
| [lastAugReset](./bitburner.resetinfo.lastaugreset.md) | | number | Numeric timestamp (from Date.now()) of last augmentation reset |
| [lastNodeReset](./bitburner.resetinfo.lastnodereset.md) | | number | Numeric timestamp (from Date.now()) of last bitnode reset |
| [ownedAugs](./bitburner.resetinfo.ownedaugs.md) | | Map&lt;string, number&gt; | A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor). |
| [ownedSF](./bitburner.resetinfo.ownedsf.md) | | Map&lt;number, number&gt; | A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. |

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; [ResetInfo](./bitburner.resetinfo.md) &gt; [ownedAugs](./bitburner.resetinfo.ownedaugs.md)
## ResetInfo.ownedAugs property
A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor).
**Signature:**
```typescript
ownedAugs: Map<string, 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; [ResetInfo](./bitburner.resetinfo.md) &gt; [ownedSF](./bitburner.resetinfo.ownedsf.md)
## ResetInfo.ownedSF property
A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level.
**Signature:**
```typescript
ownedSF: Map<number, number>;
```

View File

@@ -9,14 +9,14 @@ Apply for a job at a company.
**Signature:**
```typescript
applyToCompany(companyName: string, field: string): boolean;
applyToCompany(companyName: CompanyName | `${CompanyName}`, field: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of company to apply to. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to apply to. |
| field | string | Field to which you want to apply. |
**Returns:**

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; [Singularity](./bitburner.singularity.md) &gt; [getAugmentationFactions](./bitburner.singularity.getaugmentationfactions.md)
## Singularity.getAugmentationFactions() method
Get a list of faction(s) that have a specific Augmentation.
**Signature:**
```typescript
getAugmentationFactions(augName: string): string[];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| augName | string | Name of Augmentation. |
**Returns:**
string\[\]
Array containing the names of all factions.
## Remarks
RAM cost: 5 GB \* 16/4/1
Returns an array containing the names (as strings) of all factions that offer the specified Augmentation. If no factions offer the Augmentation, a blank array is returned.

View File

@@ -9,14 +9,14 @@ Get company favor.
**Signature:**
```typescript
getCompanyFavor(companyName: string): number;
getCompanyFavor(companyName: CompanyName | `${CompanyName}`): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of the company. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:**

View File

@@ -9,14 +9,14 @@ Get company favor gain.
**Signature:**
```typescript
getCompanyFavorGain(companyName: string): number;
getCompanyFavorGain(companyName: CompanyName | `${CompanyName}`): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of the company. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:**

View File

@@ -9,15 +9,18 @@ Get Requirements for Company Position.
**Signature:**
```typescript
getCompanyPositionInfo(companyName: string, positionName: JobName): CompanyPositionInfo;
getCompanyPositionInfo(
companyName: CompanyName | `${CompanyName}`,
positionName: JobName | `${JobName}`,
): CompanyPositionInfo;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of company to get the requirements for. Must be an exact match. |
| positionName | [JobName](./bitburner.jobname.md) | Name of position to get the requirements for. Must be an exact match. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to get the requirements for. Must be an exact match. |
| positionName | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | Name of position to get the requirements for. Must be an exact match. |
**Returns:**

View File

@@ -9,14 +9,14 @@ Get List of Company Positions.
**Signature:**
```typescript
getCompanyPositions(companyName: string): JobName[];
getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of company to get the position list for. Must be an exact match. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to get the position list for. Must be an exact match. |
**Returns:**

View File

@@ -9,14 +9,14 @@ Get company reputation.
**Signature:**
```typescript
getCompanyRep(companyName: string): number;
getCompanyRep(companyName: CompanyName | `${CompanyName}`): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of the company. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:**

View File

@@ -31,6 +31,7 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m
| [exportGame()](./bitburner.singularity.exportgame.md) | Backup game save. |
| [exportGameBonus()](./bitburner.singularity.exportgamebonus.md) | Returns Backup save bonus availability. |
| [getAugmentationBasePrice(augName)](./bitburner.singularity.getaugmentationbaseprice.md) | Get base price of an augmentation. |
| [getAugmentationFactions(augName)](./bitburner.singularity.getaugmentationfactions.md) | Get a list of faction(s) that have a specific Augmentation. |
| [getAugmentationPrereq(augName)](./bitburner.singularity.getaugmentationprereq.md) | Get the pre-requisite of an augmentation. |
| [getAugmentationPrice(augName)](./bitburner.singularity.getaugmentationprice.md) | Get price of an augmentation. |
| [getAugmentationRepReq(augName)](./bitburner.singularity.getaugmentationrepreq.md) | Get reputation requirement of an augmentation. |

View File

@@ -9,14 +9,14 @@ Quit jobs by company.
**Signature:**
```typescript
quitJob(companyName?: string): void;
quitJob(companyName?: CompanyName | `${CompanyName}`): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | _(Optional)_ Name of the company. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | _(Optional)_ Name of the company. |
**Returns:**

View File

@@ -9,14 +9,14 @@ Work for a company.
**Signature:**
```typescript
workForCompany(companyName: string, focus?: boolean): boolean;
workForCompany(companyName: CompanyName, focus?: boolean): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| companyName | string | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. |
| companyName | [CompanyName](./bitburner.companyname.md) | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. |
| focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. |
**Returns:**

View File

@@ -9,7 +9,7 @@ Set a sleeve to work for a company.
**Signature:**
```typescript
setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
setToCompanyWork(sleeveNumber: number, companyName: CompanyName | `${CompanyName}`): boolean;
```
## Parameters
@@ -17,7 +17,7 @@ setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to work for the company. |
| companyName | string | Name of the company to work for. |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company to work for. |
**Returns:**

View File

@@ -8,5 +8,7 @@
**Signature:**
```typescript
type SleeveCompanyTask = { type: "COMPANY"; companyName: string };
type SleeveCompanyTask = { type: "COMPANY"; companyName: CompanyName };
```
**References:** [CompanyName](./bitburner.companyname.md)

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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [MarketData4SCost](./bitburner.stockmarketconstants.marketdata4scost.md)
## StockMarketConstants.MarketData4SCost property
Cost of the 4S Market Data
**Signature:**
```typescript
MarketData4SCost: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [MarketDataTixApi4SCost](./bitburner.stockmarketconstants.marketdatatixapi4scost.md)
## StockMarketConstants.MarketDataTixApi4SCost property
Cost of the 4S Market Data TIX API integration
**Signature:**
```typescript
MarketDataTixApi4SCost: number;
```

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; [StockMarketConstants](./bitburner.stockmarketconstants.md)
## StockMarketConstants interface
Constants used for the stockmarket game mechanic.
**Signature:**
```typescript
interface StockMarketConstants
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [MarketData4SCost](./bitburner.stockmarketconstants.marketdata4scost.md) | | number | Cost of the 4S Market Data |
| [MarketDataTixApi4SCost](./bitburner.stockmarketconstants.marketdatatixapi4scost.md) | | number | Cost of the 4S Market Data TIX API integration |
| [msPerStockUpdate](./bitburner.stockmarketconstants.msperstockupdate.md) | | number | Normal time in ms between stock market updates |
| [msPerStockUpdateMin](./bitburner.stockmarketconstants.msperstockupdatemin.md) | | number | Minimum time in ms between stock market updates if there is stored offline/bonus time |
| [StockMarketCommission](./bitburner.stockmarketconstants.stockmarketcommission.md) | | number | Commission fee for transactions |
| [TicksPerCycle](./bitburner.stockmarketconstants.tickspercycle.md) | | number | An internal constant used while determining when to flip a stock's forecast |
| [TIXAPICost](./bitburner.stockmarketconstants.tixapicost.md) | | number | Cost of the TIX API |
| [WSEAccountCost](./bitburner.stockmarketconstants.wseaccountcost.md) | | number | Cost of the WSE account |

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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [msPerStockUpdate](./bitburner.stockmarketconstants.msperstockupdate.md)
## StockMarketConstants.msPerStockUpdate property
Normal time in ms between stock market updates
**Signature:**
```typescript
msPerStockUpdate: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [msPerStockUpdateMin](./bitburner.stockmarketconstants.msperstockupdatemin.md)
## StockMarketConstants.msPerStockUpdateMin property
Minimum time in ms between stock market updates if there is stored offline/bonus time
**Signature:**
```typescript
msPerStockUpdateMin: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [StockMarketCommission](./bitburner.stockmarketconstants.stockmarketcommission.md)
## StockMarketConstants.StockMarketCommission property
Commission fee for transactions
**Signature:**
```typescript
StockMarketCommission: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [TicksPerCycle](./bitburner.stockmarketconstants.tickspercycle.md)
## StockMarketConstants.TicksPerCycle property
An internal constant used while determining when to flip a stock's forecast
**Signature:**
```typescript
TicksPerCycle: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [TIXAPICost](./bitburner.stockmarketconstants.tixapicost.md)
## StockMarketConstants.TIXAPICost property
Cost of the TIX API
**Signature:**
```typescript
TIXAPICost: 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; [StockMarketConstants](./bitburner.stockmarketconstants.md) &gt; [WSEAccountCost](./bitburner.stockmarketconstants.wseaccountcost.md)
## StockMarketConstants.WSEAccountCost property
Cost of the WSE account
**Signature:**
```typescript
WSEAccountCost: 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; [TIX](./bitburner.tix.md) &gt; [getConstants](./bitburner.tix.getconstants.md)
## TIX.getConstants() method
Get game constants for the stock market mechanic.
**Signature:**
```typescript
getConstants(): StockMarketConstants;
```
**Returns:**
[StockMarketConstants](./bitburner.stockmarketconstants.md)
## Remarks
RAM cost: 0 GB

View File

@@ -21,6 +21,7 @@ export interface TIX
| [cancelOrder(sym, shares, price, type, pos)](./bitburner.tix.cancelorder.md) | Cancel order for stocks. |
| [getAskPrice(sym)](./bitburner.tix.getaskprice.md) | Returns the ask price of that stock. |
| [getBidPrice(sym)](./bitburner.tix.getbidprice.md) | Returns the bid price of that stock. |
| [getConstants()](./bitburner.tix.getconstants.md) | Get game constants for the stock market mechanic. |
| [getForecast(sym)](./bitburner.tix.getforecast.md) | Returns the probability that the specified stocks price will increase (as opposed to decrease) during the next tick. |
| [getMaxShares(sym)](./bitburner.tix.getmaxshares.md) | Returns the maximum number of shares of a stock. |
| [getOrders()](./bitburner.tix.getorders.md) | Returns your order book for the stock market. |

View File

@@ -7,7 +7,12 @@
**Signature:**
```typescript
companyGains(person: Person, companyName: string, workType: JobName | `${JobName}`, favor: number): WorkStats;
companyGains(
person: Person,
companyName: CompanyName | `${CompanyName}`,
workType: JobName | `${JobName}`,
favor: number,
): WorkStats;
```
## Parameters
@@ -15,7 +20,7 @@ companyGains(person: Person, companyName: string, workType: JobName | `${JobName
| Parameter | Type | Description |
| --- | --- | --- |
| person | [Person](./bitburner.person.md) | |
| companyName | string | |
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | |
| workType | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | |
| favor | number | |

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "bitburner",
"version": "2.3.2dev",
"version": "2.4.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "bitburner",
"version": "2.3.2dev",
"version": "2.4.1",
"hasInstallScript": true,
"license": "SEE LICENSE IN license.txt",
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "bitburner",
"license": "SEE LICENSE IN license.txt",
"version": "2.3.2dev",
"version": "2.4.1",
"main": "electron-main.js",
"author": {
"name": "Daniel Xie, Olivier Gagnon, et al."
@@ -102,13 +102,13 @@
"engines": {
"node": ">=14"
},
"homepage": "https://github.com/danielyxie/bitburner",
"homepage": "https://bitburner-official.github.io/",
"repository": {
"type": "git",
"url": "git+https://github.com/danielyxie/bitburner.git"
"url": "git+https://github.com/bitburner-official/bitburner-src.git"
},
"scripts": {
"doc": "npx api-extractor run && npx api-documenter markdown && rm input/bitburner.api.json && rm -r input && git add markdown/ && git add tsdoc-metadata.json",
"doc": "bash ./tools/doc.sh",
"format": "prettier -c --write .",
"format:report": "prettier -c .",
"start": "cd .app && http-server -p 8000",
@@ -127,7 +127,6 @@
"preversion": "npm install && npm run test",
"version": "sh ./tools/build-release.sh && git add --all",
"postversion": "git push -u origin dev && git push --tags",
"changelog": "node tools/fetch-changelog/index.js --from=$(cat last_changelog_hash) > changelog.md",
"bundle-doc": "node tools/bundle-doc/index.js"
"changelog": "node tools/fetch-changelog/index.js --from=$(cat last_changelog_hash) > changelog.md"
}
}

View File

@@ -227,4 +227,8 @@ export class Augmentation {
const queuedNFGLevel = Player.queuedAugmentations.filter((aug) => aug.name === this.name).length;
return ownedNFGLevel + queuedNFGLevel;
}
/** Get the next level of an augmentation to buy. Currently only relevant for NFG. */
getNextLevel(): number {
return this.getLevel() + 1;
}
}

View File

@@ -1,4 +1,5 @@
export enum AugmentationName {
NeuroFluxGovernor = "NeuroFlux Governor",
Targeting1 = "Augmented Targeting I",
Targeting2 = "Augmented Targeting II",
Targeting3 = "Augmented Targeting III",
@@ -55,7 +56,6 @@ export enum AugmentationName {
HacknetNodeNICUpload = "Hacknet Node NIC Architecture Neural-Upload",
HacknetNodeKernelDNI = "Hacknet Node Kernel Direct-Neural Interface",
HacknetNodeCoreDNI = "Hacknet Node Core Direct-Neural Interface",
NeuroFluxGovernor = "NeuroFlux Governor",
Neurotrainer1 = "Neurotrainer I",
Neurotrainer2 = "Neurotrainer II",
Neurotrainer3 = "Neurotrainer III",

View File

@@ -49,7 +49,9 @@ const NeuroFluxDisplay = (): React.ReactElement => {
<Typography variant="h5" color={Settings.theme.info}>
NeuroFlux Governor - Level {level}
</Typography>
<Typography color={Settings.theme.info}>{Augmentations[AugmentationName.NeuroFluxGovernor].stats}</Typography>
<Typography color={Settings.theme.info} whiteSpace={"pre-wrap"}>
{Augmentations[AugmentationName.NeuroFluxGovernor].stats}
</Typography>
<Typography color={Settings.theme.info}>
The power of {AugmentationName.NeuroFluxGovernor} increases with blood donations from players in real life.
Learn more <Link onClick={openBloodDonation}>here</Link>

View File

@@ -71,7 +71,7 @@ export function InstalledAugmentations(): React.ReactElement {
<Typography variant="h6" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
{selectedAug.name}
</Typography>
<Typography sx={{ maxHeight: 350, overflowY: "scroll" }}>
<Typography sx={{ maxHeight: 350, overflowY: "scroll", whiteSpace: "pre-wrap" }}>
{(() => {
const aug = Augmentations[selectedAug.name];

View File

@@ -223,7 +223,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
{aug.name}
{aug.name === AugmentationName.NeuroFluxGovernor && ` - Level ${augLevel + 1}`}
</Typography>
<Typography>{description}</Typography>
<Typography whiteSpace={"pre-wrap"}>{description}</Typography>
</>
}
>

View File

@@ -25,7 +25,7 @@ export function PurchaseAugmentationModal({ aug, faction, onClose, open }: IProp
return (
<Modal open={open} onClose={onClose}>
<Typography variant="h4">{aug.name}</Typography>
<Typography>
<Typography whiteSpace={"pre-wrap"}>
{aug.info}
<br />
<br />

View File

@@ -34,7 +34,7 @@ export function PurchasedAugmentations(): React.ReactElement {
augs.push(
<Tooltip
title={
<Typography>
<Typography whiteSpace={"pre-wrap"}>
{(() => {
const info = typeof aug.info === "string" ? <span>{aug.info}</span> : aug.info;
const tooltip = (

View File

@@ -40,10 +40,17 @@ export function ActionLevel({ action, isActive, bladeburner, rerender }: IProps)
<Box display="flex">
<Tooltip
title={
<Typography>
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed
for next level
</Typography>
action.constructor.name === "Contract" ? (
<Typography>
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed
for next level
</Typography>
) : (
<Typography>
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.OperationSuccessesPerLevel)} successes
needed for next level
</Typography>
)
}
>
<Typography>

View File

@@ -31,11 +31,6 @@ export const CONSTANTS: {
PurchasedServerMaxRam: number;
MultipleAugMultiplier: number;
TorRouterCost: number;
WSEAccountCost: number;
TIXAPICost: number;
MarketData4SCost: number;
MarketDataTixApi4SCost: number;
StockMarketCommission: number;
HospitalCostPerHp: number;
IntelligenceCrimeWeight: number;
IntelligenceInfiltrationWeight: number;
@@ -88,9 +83,9 @@ export const CONSTANTS: {
Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG
LatestUpdate: string;
} = {
VersionString: "2.3.2",
isDevBranch: true,
VersionNumber: 32,
VersionString: "2.4.1",
isDevBranch: false,
VersionNumber: 34,
/** 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
@@ -140,13 +135,6 @@ export const CONSTANTS: {
// TOR Router
TorRouterCost: 200e3,
// Stock market
WSEAccountCost: 200e6,
TIXAPICost: 5e9,
MarketData4SCost: 1e9,
MarketDataTixApi4SCost: 25e9,
StockMarketCommission: 100e3,
// Hospital/Health
HospitalCostPerHp: 100e3,
@@ -227,42 +215,48 @@ export const CONSTANTS: {
InfiniteLoopLimit: 2000,
Donations: 79,
Donations: 113,
// Also update doc/source/changelog.rst
LatestUpdate: `
v2.3.2 dev - Changelog updated 7/12/2023
----------------------------------------
## v2.4.1 Update (8/26/23)
Also see 2.3.1 release notes: https://github.com/bitburner-official/bitburner-src/releases/tag/v2.3.1
### FEATURE ADDITIONS:
GENERAL / MISC:
- Added "Enable terminal history search with arrow keys" option in Misc options category, inspired by similar functionality in shells like zsh. (@ficocelliguy)
* Added documentation browser ingame. This is the new primary location for game documentation. (@hydroflame)
* Syntax errors now show helpful details at script editor / terminal (@bezrodnov)
* A script's ram will no longer free up twice if it was killed during its own atExit (@d0sboots)
* Ram calculation should now be able to handle barrel files and renamed exports. (@G4mingJon4s)
* ns.printRaw and ns.tprintRaw are now documented functions. (@Snarling)
* "Back" button from faction augs leads to previous page, instead of always to main faction screen (@bezrodnov)
* Addressed an issue where money hacked was being Math.floored incorrectly (@MeggalBozale)
* Aliases that reference their own name stop expanding after first replacement. (@NilsRamstoeck)
* Hitting enter at the terminal with nothing typed in will print out an empty line (@rqzcho)
* Fixed a bug where dragging a tail window titlebar could also scroll the tail window content (@bezrodnov)
* Show more info in the savegame comparison tool (@bezrodnov)
* Fixed Script Editor indent option having backwards behavior. (@Snarling)
* Internal code refactors (@bezrodnov, @Snarling)
* Documentation fixes (@tdnzr, @amuck-gorilla, @rodneygauna, @hydroflame, @Snarling)
* Nerf noodle bar
### BUGFIX:
SPOILER SECTIONS:
- Fixed a bug where buying NeuroFlux Governor would buy one less level than expected (@zerbosh)
- Fixed an issue that could cause the Coding Contract UI to become unreachable (@myCatsName)
- Infiltration: Knowledge of Apollo aug no longer highlights the incorrect wires (@Snarling)
------------
### CODEBASE / DOCS / MISC:
CORPORATION:
- Added a new theme "zerenity" (@Zelow79)
- Reorganize game constants (@zerbosh)
- Reorganize ingame documentation folder structure, simplify documentation bundling (@Snarling)
- IP Address coding contract accepts single-quoted entries (@myCatsName)
- Updated an outdated message on ns.killall logs (@myCatsName)
- Updated documentation for ns.share and ns.getSharePower (@myCatsName)
- Removed functions (like ns.getServerRam) are no longer shown when enumerating ns entries. (@Snarling)
- Removed more references to ReadTheDocs that remained after 2.4.0 (@hydroflame)
- Fixed some typos/spacing (@myCatsName)
- Fixed an issue with incorrect React keys in active scripts page (@zornlemma)
* ns.corporation.hireEmployee now actually defaults to Unassigned instead of failing. (@Snarling)
* ns.corporation.getProduct now provides investment amounts (@Snarling)
* Invalid materials for a division can no longer be bought through the API. (@Snarling)
* Fixed a React error that could occur if a division had invalid materials. (@Snarling)
### API CHANGES (NON-SPOILER)
- Added ns.stock.getConstants (@Snarling)
- Added ownedAugs and ownedSF properties to return data of ns.getResetInfo (@Snarling)
### API CHANGES (SPOILERS):
- Added ns.singularity.getAugmentationFactions to provide a list of factions that have a given augmentation (@myCatsName)
- ns.corporation.getConstants now has a ram cost of 0 (@Snarling)
### OTHER CHANGES (SPOILERS):
- Successes for next level is now accurate in the UI for Bladeburner operations (@myCatsName)
- ns.sleeve.setToFactionWork no longer allows working for factions the player has not joined (@Snarling)
`,
};

View File

@@ -66,7 +66,7 @@ export function IssueNewSharesModal(props: IProps): React.ReactElement {
let dialogContents =
`Issued ${formatShares(newShares)} new shares` + ` and raised ${formatMoney(profit)}.` + (privateShares > 0)
? "\n" + formatShares(privateShares) + "of these shares were bought by private investors."
? "\n" + formatShares(privateShares) + " of these shares were bought by private investors."
: "";
dialogContents += `\n\nStock price decreased to ${formatMoney(corp.sharePrice)}`;
dialogBoxCreate(dialogContents);

View File

@@ -0,0 +1,3 @@
# Corporations
PLACEHOLDER

View File

@@ -1,7 +1,91 @@
.. \_changelog:
# Changelog
## v2.4.1 Update (8/26/23)
### FEATURE ADDITIONS:
- Added "Enable terminal history search with arrow keys" option in Misc options category, inspired by similar functionality in shells like zsh. (@ficocelliguy)
### BUGFIX:
- Fixed a bug where buying NeuroFlux Governor would buy one less level than expected (@zerbosh)
- Fixed an issue that could cause the Coding Contract UI to become unreachable (@myCatsName)
- Infiltration: Knowledge of Apollo aug no longer highlights the incorrect wires (@Snarling)
### CODEBASE / DOCS / MISC:
- Added a new theme "zerenity" (@Zelow79)
- Reorganize game constants (@zerbosh)
- Reorganize ingame documentation folder structure, simplify documentation bundling (@Snarling)
- IP Address coding contract accepts single-quoted entries (@myCatsName)
- Updated an outdated message on ns.killall logs (@myCatsName)
- Updated documentation for ns.share and ns.getSharePower (@myCatsName)
- Removed functions (like ns.getServerRam) are no longer shown when enumerating ns entries. (@Snarling)
- Removed more references to ReadTheDocs that remained after 2.4.0 (@hydroflame)
- Fixed some typos/spacing (@myCatsName)
- Fixed an issue with incorrect React keys in active scripts page (@zornlemma)
### API CHANGES (NON-SPOILER)
- Added ns.stock.getConstants (@Snarling)
- Added ownedAugs and ownedSF properties to return data of ns.getResetInfo (@Snarling)
### API CHANGES (SPOILERS):
- Added ns.singularity.getAugmentationFactions to provide a list of factions that have a given augmentation (@myCatsName)
- ns.corporation.getConstants now has a ram cost of 0 (@Snarling)
### OTHER CHANGES (SPOILERS):
- Successes for next level is now accurate in the UI for Bladeburner operations (@myCatsName)
- ns.sleeve.setToFactionWork no longer allows working for factions the player has not joined (@Snarling)
## v2.4.0 - Death to readthedocs
NETSCRIPT:
- Added ns.getFunctionRamCost
- Added run and install identifier
CORP:
- Add product investment info to API
- Prevent issues with invalid materials in warehouse
- Update exportMaterial amount to `number | string`
- Validate city with office for starting product development
DOCUMENTATION:
- readthedoc.bitburner.whatever has been fully deprecated.
That documentation is now available in-game. This will make
documentation easier to maintain and easier to keep locked
with the specific version of the game you're playing.
It's also in `.md`, which is more common than `.rst`
- Add `printRaw` and `tprintRaw` docs
- Better docs for `ascension` result
- Complete the spec for hamming codes enhancement
- Fix example code for `scp`
MISC.
- Fixed a bug where RAM calculation would be innacurate for near copy of scripts on different servers
- Fix mislead error message about ram miscalculation when script contains syntax errors.
- Fix bug in calculating faction donation amount
- Fix bug where Sleeve would have difficulty doing certain University activities.
- Fix regression for crime in progress
- Prevent log scrolling on Active Script window drag
- show all skills in import save comparison tool
- Fix extremely minor calculation error where money drained after hack was being floor()
- Fix ram evaluation to include more edge-cases
- Fix potential double-free in atExit()
CODEBASE:
- Work on Enum Helper + Reorganise
- enforce eslint react checks
- corp code style improvement
- Added a lot of typesafety
## v2.3.1 - Bugfixes 7 June 2023
NETSCRIPT:
@@ -240,7 +324,7 @@ GRAFTING:
DOCUMENTATION
- Many documentation updates (@Mughur, @d0sboots, @Snarling, @teauxfu).
- Official non-markdown docs are at http://bitburner-official.readthedocs.io/
- Official non-markdown docs are at https://github.com/bitburner-official/bitburner-src/tree/dev/src/Documentation/doc
- Official dev version markdown docs are at https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md
- Official stable version markdown docs are at https://github.com/bitburner-official/bitburner-src/blob/stable/markdown/bitburner.ns.md
- Dev version documentation is now kept up to date as changes are made. (@Snarling)
@@ -457,8 +541,8 @@ API
- Corp functions now return copy of constant arrays instead of the original (by @Mughur)
- All the player sub-objects need to be copied for `getPlayer`. (by @MageKing17)
- add corp get<constant> functions, UI (by @Mughur)
- [danielyxie/bitburner#3860] destroyW0r1dD43m0n now properly gives achievements
- [danielyxie/bitburner#3890] favor now properly syncs across pages and the Donate achievement is now given correctly (by @Aerophia)
- destroyW0r1dD43m0n now properly gives achievements
- favor now properly syncs across pages and the Donate achievement is now given correctly (by @Aerophia)
- getCrimeStats use bitnode multipliers in the output of crime stats (by @phyzical)
- add singularity function for exporting game save back (by @phyzical)
@@ -466,11 +550,11 @@ CODING CONTRACTS
- inconsistent probability for generation between online and offline (by @quacksouls)
- Don't stringify answer if already a string (by @alainbryden)
- [danielyxie/bitburner#3755] change input handling for contract attempts (by @Snarling)
- change input handling for contract attempts (by @Snarling)
CORPORATION
- [danielyxie/bitburner#3880], [danielyxie/bitburner#3876], [danielyxie/bitburner#3322], [danielyxie/bitburner#3138] Bunch of corporation fixes (by @Mughur)
- Bunch of corporation fixes (by @Mughur)
- Gave investors some economics classes (by @Mughur)
- Limit shareholder priority on newly issued shares (by @Undeemiss)
- dont take research points for something already researched via api (by @phyzical)
@@ -478,14 +562,14 @@ CORPORATION
CORPORATION API
- Fix up param order for limitProductProduction to match docs (by @phyzical)
- [danielyxie/bitburner#3655] Expose exports from Material (by @Rasmoh)
- Expose exports from Material (by @Rasmoh)
DOCUMENTATION
- update docs a bit more, amending some BN and SF texts (by @Mughur)
- Fixed Argument order for scp() (by @njalooo)
- Some typo fixes in Netscript functions (by @quacksouls)
- [danielyxie/bitburner#4033] Why use Coding Contract API (by @quacksouls)
- Why use Coding Contract API (by @quacksouls)
- typo fix in description of Caesar cipher (by @quacksouls)
- typo fix in terminal.rst (by @BugiDev)
- Update bitburner.sleeve.settobladeburneraction.md (by @borisflagell)
@@ -496,32 +580,31 @@ DOCUMENTATION
NETSCRIPT
- Added functions to resize, move, and close tail windows
- [danielyxie/bitburner#2376] ns.exit now exits immediately (by @Snarling)
- [danielyxie/bitburner#4055] Fix dynamic ram check (by @Snarling)
- [danielyxie/bitburner#4037] ns1 wraps deeper layers correctly. (by @Snarling)
- [danielyxie/bitburner#3963] Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K)
- ns.exit now exits immediately (by @Snarling)
- Fix dynamic ram check (by @Snarling)
- ns1 wraps deeper layers correctly. (by @Snarling)
- Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K)
- Typo fixes in CodingContract, Hacknet, Singularity APIs (by @quacksouls)
- Fix a typo in doc of Singularity.travelToCity() (by @quacksouls)
- Update netscript definition file for scp, write, read, and flags (by @Snarling)
- Correct missing ! for boolean coercion in Corporation.createCorporation(). (by @Risenafis)
- Normalized Stock API logging (by @Snarling)
- [danielyxie/bitburner#3992] allow null duration in toast ns function (by @RollerKnobster)
- allow null duration in toast ns function (by @RollerKnobster)
- Correct missing `!` for boolean coercion in `singularity.workForCompany()`. (by @MageKing17)
- ns.scp and ns.write are now synchronous + fix exec race condition (by @Snarling)
- [danielyxie/bitburner#2931] atExit now allows synchronous ns functions (by @Snarling)
- atExit now allows synchronous ns functions (by @Snarling)
- Improve real life CPU and memory performance of scripts. (by @Snarling)
- Prompt Add user friendly message to avoid throwing recovery screen for invalid choices (by @phyzical)
- [danielyxie/bitburner#4081] Rerunning a script from tail window recalculates ram usage (by @Snarling)
- [danielyxie/bitburner#3962] The correct script will be closed even if the player modifies args (v2.0) (by @Snarling)
- Rerunning a script from tail window recalculates ram usage (by @Snarling)
- The correct script will be closed even if the player modifies args (v2.0) (by @Snarling)
- Corrected ns formula for infiltration rewards (by @ezylot)
- Add singularity check for finishing company work (by @Snarling)
SLEEVES
- [danielyxie/bitburner#3819] Allow using the regeneration chamber with sleeves to heal them. (by @coderanger)
- [danielyxie/bitburner#4063] fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts (by @Snarling)
- [danielyxie/bitburner#4051] Sleeves no longer crash when player quits company sleeve was working (by @Snarling)
- [danielyxie/bitburner#4022], [danielyxie/bitburner#4024], [danielyxie/bitburner#4025], [danielyxie/bitburner#3998] (by @Mughur)
- Allow using the regeneration chamber with sleeves to heal them. (by @coderanger)
- fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts (by @Snarling)
- Sleeves no longer crash when player quits company sleeve was working (by @Snarling)
- Sleeve crime gain bitnode multiplier fix (by @Mughur)
REMOTE FILE API
@@ -531,30 +614,30 @@ REMOTE FILE API
UI
- [danielyxie/bitburner#2962] add a setting to display middle time unit in Time Elapsed String (by @hydroflame)
- [danielyxie/bitburner#4106] fix incorrect experience display in Crime UI. (by @SilverNexus)
- add a setting to display middle time unit in Time Elapsed String (by @hydroflame)
- fix incorrect experience display in Crime UI. (by @SilverNexus)
- Bitnode stats now show if BB/Corporation are disabled (by @Kelenius)
- Removed three empty lines from BB status screen (by @Kelenius)
- Add missing space to BN7 description (by @hex7cd)
- Improvements to crime work UI (by @Kelenius)
- [danielyxie/bitburner#3975], [danielyxie/bitburner#3882] Script Editor more responsive on resize, and fix dirty file indicator (by @Snarling)
- Script Editor more responsive on resize, and fix dirty file indicator (by @Snarling)
MISC
- Added weight to GangMemberTask construction call (by @ezylot)
- Fix ANSI display bugs (by @Snarling)
- Debounce updateRAM calls in script editor. (by @Snarling)
- [danielyxie/bitburner#3979] Allow characters & and ' in filenames (by @Snarling)
- [danielyxie/bitburner#3965] Corrected tutorial text (by @mihilt)
- Allow characters & and ' in filenames (by @Snarling)
- Corrected tutorial text (by @mihilt)
- Fix infil definitions.d.ts (by @phyzical)
- Modify PR template (by @Hoekstraa)
- crime gains, sleeve gang augs and faq (by @Mughur)
- [danielyxie/bitburner#3649] Preventing server starting security level from going above 100 (by @Shiiyu)
- Preventing server starting security level from going above 100 (by @Shiiyu)
- Adds Shadows of Anarchy (by @Lagicrus)
- Added intormation about hacking managers to hacking algorithms page (by @Kelenius)
- Fix Jest CI Error (by @geggleto)
- multiple hasAugmentation checks didn't check if the augment was installed (by @Mughur)
- [danielyxie/bitburner#2442] & [danielyxie/bitburner#2795] (by @G4mingJon4s)
- & (by @G4mingJon4s)
- Adds info regarding augments and focus (by @Lagicrus)
- Removed console.log line (by @dhosborne)
- Update some doc (by @hydroflame)
@@ -1213,7 +1296,7 @@ Stanek Gift
** Documentation **
- The new documentation for the netscript API is available at
https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md
https://github.com/bitburner-official/bitburner-src/blob/dev/markdown/bitburner.ns.md
This documentation is used in-game to validate the code, in-editor to autocomplete, and
for users to reference. This is a huge quality of life improvements for me.
@@ -1263,7 +1346,7 @@ Stanek Gift
** Announcement **
- Several API breaks have been implemented.
- See the v1.0.0 migration guide https://bitburner.readthedocs.io/en/latest/v1.0.0_migration.html
- See the v1.0.0 migration guide under Documentation
- Everyone gets 10 free neuroflux level.
** Netscript **
@@ -2642,8 +2725,6 @@ Stanek Gift
- Added a very rudimentary directory system to the Terminal
- Details here: https://bitburner.readthedocs.io/en/latest/basicgameplay/terminal.html#filesystem-directories
- Added numHashes(), hashCost(), and spendHashes() functions to the Netscript Hacknet Node API
- 'Generate Coding Contract' hash upgrade is now more expensive
- 'Generate Coding Contract' hash upgrade now generates the contract randomly on the server, rather than on home computer
@@ -3078,7 +3159,7 @@ Stanek Gift
- Added 'var' declarations in Netscript 1.0 (only works with 'var', not 'let' or 'const')
- Script base RAM cost is now 1.6 GB (increased from 1.4 GB)
- While/for loops and if statements no longer cost RAM in scripts
- Made short-circuit evaluation logic more consistent in Netscript 1.0 (see https://github.com/danielyxie/bitburner/issues/308)
- Made short-circuit evaluation logic more consistent in Netscript 1.0
- Changelog button in the Options menu now links to the new Changelog URL (by Github user thePalindrome)
- Skill level calculation is now 'smoother' (by Github user hydroflame)
- Added a button to 'beautify' scripts in the text editor (by Github user hydroflame)
@@ -3137,7 +3218,7 @@ Stanek Gift
## v0.37.0 - 5/20/2018
- NetscriptJS (Netscript 2.0) released (Documentation here: http://bitburner.readthedocs.io/en/latest/netscriptjs.html)
- NetscriptJS (Netscript 2.0) released
- Running the game with the '?noScripts' query will start the game without loading any of your scripts. This should be used if you accidentally write a script that crashes your game
## v0.36.1 - 5/11/2018

View File

@@ -5,7 +5,7 @@
If your game is frozen or stuck in any way, then the most likely culprit is an infinitely running loop in your script.
To get past the freezing, run the game with `?noScripts` in the URL:
[Link to no freeze](https://danielyxie.github.io/bitburner/?noScripts)
[Link to no freeze](https://bitburner-official.github.io?noScripts)
Then, to fix your script, make sure you have a `sleep()` or any other timed function like `hack()` or `grow()` in any infinite loops:

View File

@@ -3,35 +3,24 @@ import React from "react";
import Button from "@mui/material/Button";
import { MD } from "../../ui/MD/MD";
import { getPage } from "./root";
import { getPage } from "../root";
import { Navigator, useHistory } from "../../ui/React/Documentation";
import { CONSTANTS } from "../../Constants";
const resolveRelativePath = (folder: string, relative: string): string => {
const noLastSlash = folder.endsWith("/") ? folder.slice(0, folder.length - 1) : folder;
const lastIndex = noLastSlash.lastIndexOf("/");
const prefix = lastIndex === -1 ? "" : noLastSlash.slice(0, lastIndex + 1);
const suffix = relative.slice("../".length);
return prefix + suffix;
};
const resolvePath = (currentPath: string, newPath: string): string => {
const lastIndex = currentPath.lastIndexOf("/");
const folder = lastIndex === -1 ? "" : currentPath.slice(0, lastIndex + 1);
if (!newPath.startsWith("../")) return folder + newPath;
return resolveRelativePath(folder, newPath);
};
import { resolveFilePath } from "../../Paths/FilePath";
export function DocumentationRoot(): React.ReactElement {
const history = useHistory();
const page = getPage(history.page);
const navigator = {
navigate(relPath: string, external: boolean) {
const newPath = resolvePath(history.page, relPath);
const newPath = resolveFilePath("./" + relPath, history.page);
if (!newPath) {
console.error(`Bad path ${relPath} from ${history.page} while navigating docs.`);
return;
}
if (external) {
const ver = CONSTANTS.isDevBranch ? "dev" : "stable";
const url = `https://github.com/bitburner-official/bitburner-src/blob/${ver}/src/Documentation/ui/doc/${newPath}`;
const url = `https://github.com/bitburner-official/bitburner-src/blob/${ver}/src/Documentation/doc/${newPath}`;
window.open(url, "_newtab");
return;
}

View File

@@ -84,7 +84,7 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
} else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {
const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
if (aug.name == AugmentationName.NeuroFluxGovernor) {
queuedAugmentation.level = aug.getLevel();
queuedAugmentation.level = aug.getNextLevel();
}
Player.queuedAugmentations.push(queuedAugmentation);

View File

@@ -1,14 +1,4 @@
import {
BugReport,
Chat,
Download,
LibraryBooks,
Palette,
Reddit,
Save,
SystemUpdateAlt,
Upload,
} from "@mui/icons-material";
import { BugReport, Chat, Download, LibraryBooks, Palette, Reddit, Save, Upload } from "@mui/icons-material";
import { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from "@mui/material";
import { default as React, useRef, useState } from "react";
import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal";
@@ -239,7 +229,7 @@ export const GameOptionsSidebar = (props: IProps): React.ReactElement => {
sx={{
gridArea: "links",
display: "grid",
gridTemplateAreas: `"bug changelog"
gridTemplateAreas: `"bug bug"
"discord reddit"
"tut tut"
"plaza plaza"`,
@@ -255,14 +245,6 @@ export const GameOptionsSidebar = (props: IProps): React.ReactElement => {
>
Report Bug
</Button>
<Button
startIcon={<SystemUpdateAlt />}
href="https://bitburner-official.readthedocs.io/en/latest/changelog.html"
target="_blank"
sx={{ gridArea: " changelog" }}
>
Changelog
</Button>
<Button startIcon={<LibraryBooks />} onClick={() => setConfirmResetOpen(true)} sx={{ gridArea: "tut" }}>
Reset tutorial
</Button>

View File

@@ -30,6 +30,18 @@ export const MiscPage = (): React.ReactElement => {
</>
}
/>
<OptionSwitch
checked={Settings.EnableHistorySearch}
onChange={(newValue) => (Settings.EnableHistorySearch = newValue)}
text="Enable terminal history search with arrow keys"
tooltip={
<>
If there is user-entered text in the terminal, using the up arrow will search through the terminal history
for previous commands that start with the current text, instead of navigating to the most recent history
item. Search results can be executed immediately via 'enter', or autofilled into the terminal with 'tab'.
</>
}
/>
</GameOptionsPage>
);
};

View File

@@ -20,7 +20,10 @@ export const RemoteAPIPage = (): React.ReactElement => {
text editor and then upload files to the home server.
</Typography>
<Typography>
<Link href="https://bitburner-official.readthedocs.io/en/latest/remoteapi.html" target="_blank">
<Link
href="https://github.com/bitburner-official/bitburner-src/blob/dev/src/Documentation/doc/programming/remote_api.md"
target="_blank"
>
Documentation
</Link>
</Typography>

View File

@@ -134,7 +134,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP
}}
>
{Array.from({ length: wires.length }).map((_, i) => {
const isCorrectWire = cutWires[i + 1] || wiresToCut.has(i + 1);
const isCorrectWire = cutWires[i] || wiresToCut.has(i);
const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary;
return (
<Typography key={i} style={{ color: color }}>
@@ -148,7 +148,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP
if ((i === 3 || i === 4) && cutWires[j]) {
return <Typography key={j}></Typography>;
}
const isCorrectWire = cutWires[j + 1] || wiresToCut.has(j + 1);
const isCorrectWire = cutWires[j] || wiresToCut.has(j);
const wireColor =
hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length];
return (

View File

@@ -6,10 +6,6 @@ export const Literatures: Record<LiteratureName, Literature> = {
title: "The Beginner's Guide to Hacking",
filename: LiteratureName.HackersStartingHandbook,
text:
"Some resources:<br><br>" +
"<a class='a-link-button' href='https://bitburner-official.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br>" +
"<a class='a-link-button' href='https://bitburner-official.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br>" +
"<a class='a-link-button' href='https://bitburner-official.readthedocs.io/en/latest/netscript.html' target='_blank' style='margin:4px'>Netscript Documentation</a><br><br>" +
"When starting out, hacking is the most profitable way to earn money and progress. This " +
"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>" +
"-hack() and grow() both work by percentages. hack() steals a certain percentage of the " +

View File

@@ -46,7 +46,9 @@ class NSProxyHandler<API extends GenericAPI<API>> {
getOwnPropertyDescriptor(__target: unknown, key: keyof API & string): PropertyDescriptor | undefined {
if (!this.has(__target, key)) return undefined;
return { value: this.get(__target, key, this), configurable: true, enumerable: true, writable: false };
if (Object.hasOwn(this.memoed, key)) return Object.getOwnPropertyDescriptor(this.memoed, key);
this.get(__target, key, this);
return Object.getOwnPropertyDescriptor(this.memoed, key);
}
defineProperty(__target: unknown, __key: unknown, __attrs: unknown): boolean {
@@ -62,8 +64,9 @@ class NSProxyHandler<API extends GenericAPI<API>> {
const ours = this.memoed[key];
if (ours) return ours;
const field = this.ns[key];
if (!field) return field;
const descriptor = Object.getOwnPropertyDescriptor(this.ns, key);
if (!descriptor) return descriptor;
const field = descriptor.value;
if (typeof field === "function") {
const arrayPath = [...this.tree, key];
@@ -75,10 +78,11 @@ class NSProxyHandler<API extends GenericAPI<API>> {
const wrappedFunction = function (...args: unknown[]): unknown {
// What remains *must* be called every time.
helpers.checkEnvFlags(ctx);
helpers.updateDynamicRam(ctx, getRamCost(...arrayPath));
helpers.updateDynamicRam(ctx, getRamCost(arrayPath));
return func(...args);
};
return ((this.memoed[key] as APIFn) = wrappedFunction);
Object.defineProperty(this.memoed, key, { ...descriptor, value: wrappedFunction });
return wrappedFunction;
}
if (typeof field === "object") {
return ((this.memoed[key] as GenericAPI<API[keyof API]>) = NSProxy(
@@ -105,12 +109,26 @@ export function NSProxy<API extends GenericAPI<API>>(
}
/** Specify when a function was removed from the game, and its replacement function. */
export function removedFunction(version: string, replacement: string, replaceMsg?: boolean) {
return (ctx: NetscriptContext) => () => {
throw helpers.makeRuntimeErrorMsg(
ctx,
`Function removed in ${version}. ${replaceMsg ? replacement : `Please use ${replacement} instead.`}`,
"REMOVED FUNCTION",
);
};
interface RemovedFunctionInfo {
/** The version in which the function was removed */
version: string;
/** The replacement function to use, or the entire replacement message if replaceMsg is true. */
replacement: string;
/** If set, replacement is treated as a full replacement message. */
replaceMsg?: true;
}
export function setRemovedFunctions(api: object, infos: Record<string, RemovedFunctionInfo>) {
for (const [key, { version, replacement, replaceMsg }] of Object.entries(infos)) {
Object.defineProperty(api, key, {
value: (ctx: NetscriptContext) => () => {
throw helpers.makeRuntimeErrorMsg(
ctx,
`Function removed in ${version}. ${replaceMsg ? replacement : `Please use ${replacement} instead.`}`,
"REMOVED FUNCTION",
);
},
configurable: true,
enumerable: false,
});
}
}

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