mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de5ebc993b | ||
|
|
aaaa980d10 | ||
|
|
7b05bed0d4 | ||
|
|
42d70506cc | ||
|
|
d5525f39bc | ||
|
|
86b0bd5ac7 | ||
|
|
7ea0725a39 | ||
|
|
fbdd8aee58 | ||
|
|
633f3ef07e | ||
|
|
b7ad3395ae | ||
|
|
7500ef0da2 | ||
|
|
cef452d35e | ||
|
|
4ca598defb | ||
|
|
d637828759 | ||
|
|
5c7b30ef15 | ||
|
|
647b78c9f7 | ||
|
|
c4fe88e0c7 | ||
|
|
931d7e588a | ||
|
|
aed01b0979 | ||
|
|
9e55d00b4f | ||
|
|
6b7cab6ac4 | ||
|
|
2e84512881 | ||
|
|
2c0f7f1eda | ||
|
|
e5b1fd6b58 | ||
|
|
3ced0575a4 | ||
|
|
75579a2ff1 | ||
|
|
83b7c380ff | ||
|
|
e624db5238 | ||
|
|
1c6369ffa4 | ||
|
|
a85efbc4da | ||
|
|
e9bbe57902 | ||
|
|
888e5f9c8a | ||
|
|
e7312d97e6 | ||
|
|
fc86895c30 | ||
|
|
1e0d3a7747 | ||
|
|
b4836e5329 |
@@ -6,15 +6,14 @@
|
|||||||
|
|
||||||
Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game)
|
Bitburner is a programming-based [incremental game](https://en.wikipedia.org/wiki/Incremental_game)
|
||||||
that revolves around hacking and cyberpunk themes.
|
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.
|
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).
|
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
|
# Documentation
|
||||||
|
|
||||||
The game's official documentation can be found on [Read The
|
The game's official documentation can be found in-game.
|
||||||
Docs](http://bitburner-official.readthedocs.io/). Please note that this is still a work-in-progress.
|
|
||||||
|
|
||||||
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).
|
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).
|
||||||
|
|
||||||
|
|||||||
@@ -60,12 +60,8 @@ called `npm` is installed as well.
|
|||||||
|
|
||||||
Not all code contributions will be accepted. The safest way to ensure
|
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
|
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.
|
run your idea(s)/plan(s) past the developpers first.
|
||||||
You can contact him through:
|
You can contact him through Discord.
|
||||||
|
|
||||||
- Github
|
|
||||||
- Discord
|
|
||||||
- [Reddit](https://www.reddit.com/user/chapt3r/)
|
|
||||||
|
|
||||||
Otherwise, here are some general guidelines for determining what types of
|
Otherwise, here are some general guidelines for determining what types of
|
||||||
changes are okay to contribute:
|
changes are okay to contribute:
|
||||||
@@ -217,9 +213,8 @@ the following rules:
|
|||||||
|
|
||||||
## As a Documenter
|
## As a Documenter
|
||||||
|
|
||||||
To contribute to and view your changes to the BitBurner documentation on [Read The
|
To contribute to and view your changes to the BitBurner documentation in-game, you will
|
||||||
Docs](http://bitburner.readthedocs.io/), you will
|
need to edit the files in [this folder](https://github.com/bitburner-official/bitburner-src/tree/dev/src/Documentation/doc)
|
||||||
need to have Python installed, along with [Sphinx](http://www.sphinx-doc.org).
|
|
||||||
|
|
||||||
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.
|
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.
|
- Rebase your branch if necessary.
|
||||||
- When submitting the pull request, make sure that the base fork is
|
- When submitting the pull request, make sure that the base fork is
|
||||||
_bitburner-official/bitburner-src_ and the base is _dev_.
|
_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
|
## Deploying a new version
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bitburner",
|
"name": "bitburner",
|
||||||
"version": "2.3.2dev",
|
"version": "2.4.1",
|
||||||
"description": "A cyberpunk-themed programming incremental game",
|
"description": "A cyberpunk-themed programming incremental game",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"author": "Daniel Xie, Olivier Gagnon, et al.",
|
"author": "Daniel Xie, Olivier Gagnon, et al.",
|
||||||
|
|||||||
57
markdown/bitburner.companyname.md
Normal file
57
markdown/bitburner.companyname.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyName](./bitburner.companyname.md)
|
||||||
|
|
||||||
|
## CompanyName enum
|
||||||
|
|
||||||
|
Names of all companies
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
declare enum CompanyName
|
||||||
|
```
|
||||||
|
|
||||||
|
## Enumeration Members
|
||||||
|
|
||||||
|
| Member | Value | Description |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| AeroCorp | <code>"AeroCorp"</code> | |
|
||||||
|
| AlphaEnterprises | <code>"Alpha Enterprises"</code> | |
|
||||||
|
| BachmanAndAssociates | <code>"Bachman & Associates"</code> | |
|
||||||
|
| BladeIndustries | <code>"Blade Industries"</code> | |
|
||||||
|
| CarmichaelSecurity | <code>"Carmichael Security"</code> | |
|
||||||
|
| CIA | <code>"Central Intelligence Agency"</code> | |
|
||||||
|
| ClarkeIncorporated | <code>"Clarke Incorporated"</code> | |
|
||||||
|
| CompuTek | <code>"CompuTek"</code> | |
|
||||||
|
| DefComm | <code>"DefComm"</code> | |
|
||||||
|
| DeltaOne | <code>"DeltaOne"</code> | |
|
||||||
|
| ECorp | <code>"ECorp"</code> | |
|
||||||
|
| FoodNStuff | <code>"FoodNStuff"</code> | |
|
||||||
|
| FourSigma | <code>"Four Sigma"</code> | |
|
||||||
|
| FulcrumTechnologies | <code>"Fulcrum Technologies"</code> | |
|
||||||
|
| GalacticCybersystems | <code>"Galactic Cybersystems"</code> | |
|
||||||
|
| GlobalPharmaceuticals | <code>"Global Pharmaceuticals"</code> | |
|
||||||
|
| HeliosLabs | <code>"Helios Labs"</code> | |
|
||||||
|
| IcarusMicrosystems | <code>"Icarus Microsystems"</code> | |
|
||||||
|
| JoesGuns | <code>"Joe's Guns"</code> | |
|
||||||
|
| KuaiGongInternational | <code>"KuaiGong International"</code> | |
|
||||||
|
| LexoCorp | <code>"LexoCorp"</code> | |
|
||||||
|
| MegaCorp | <code>"MegaCorp"</code> | |
|
||||||
|
| NetLinkTechnologies | <code>"NetLink Technologies"</code> | |
|
||||||
|
| NoodleBar | <code>"Noodle Bar"</code> | |
|
||||||
|
| NovaMedical | <code>"Nova Medical"</code> | |
|
||||||
|
| NSA | <code>"National Security Agency"</code> | |
|
||||||
|
| NWO | <code>"NWO"</code> | |
|
||||||
|
| OmegaSoftware | <code>"Omega Software"</code> | |
|
||||||
|
| OmniaCybersystems | <code>"Omnia Cybersystems"</code> | |
|
||||||
|
| OmniTekIncorporated | <code>"OmniTek Incorporated"</code> | |
|
||||||
|
| Police | <code>"Aevum Police Headquarters"</code> | |
|
||||||
|
| RhoConstruction | <code>"Rho Construction"</code> | |
|
||||||
|
| SolarisSpaceSystems | <code>"Solaris Space Systems"</code> | |
|
||||||
|
| StormTechnologies | <code>"Storm Technologies"</code> | |
|
||||||
|
| SysCoreSecurities | <code>"SysCore Securities"</code> | |
|
||||||
|
| UniversalEnergy | <code>"Universal Energy"</code> | |
|
||||||
|
| VitaLife | <code>"VitaLife"</code> | |
|
||||||
|
| WatchdogSecurity | <code>"Watchdog Security"</code> | |
|
||||||
|
|
||||||
@@ -34,12 +34,10 @@ declare enum JobName
|
|||||||
| IT3 | <code>"Systems Administrator"</code> | |
|
| IT3 | <code>"Systems Administrator"</code> | |
|
||||||
| networkEng0 | <code>"Network Engineer"</code> | |
|
| networkEng0 | <code>"Network Engineer"</code> | |
|
||||||
| networkEng1 | <code>"Network Administrator"</code> | |
|
| networkEng1 | <code>"Network Administrator"</code> | |
|
||||||
| security0 | <code>"Police Officer"</code> | |
|
| security0 | <code>"Security Guard"</code> | |
|
||||||
| security1 | <code>"Police Chief"</code> | |
|
| security1 | <code>"Security Officer"</code> | |
|
||||||
| security2 | <code>"Security Guard"</code> | |
|
| security2 | <code>"Security Supervisor"</code> | |
|
||||||
| security3 | <code>"Security Officer"</code> | |
|
| security3 | <code>"Head of Security"</code> | |
|
||||||
| security4 | <code>"Security Supervisor"</code> | |
|
|
||||||
| security5 | <code>"Head of Security"</code> | |
|
|
||||||
| securityEng | <code>"Security Engineer"</code> | |
|
| securityEng | <code>"Security Engineer"</code> | |
|
||||||
| software0 | <code>"Software Engineering Intern"</code> | |
|
| software0 | <code>"Software Engineering Intern"</code> | |
|
||||||
| software1 | <code>"Junior Software Engineer"</code> | |
|
| software1 | <code>"Junior Software Engineer"</code> | |
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
| Enumeration | Description |
|
| Enumeration | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [CityName](./bitburner.cityname.md) | Names of all cities |
|
| [CityName](./bitburner.cityname.md) | Names of all cities |
|
||||||
|
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
|
||||||
| [CrimeType](./bitburner.crimetype.md) | |
|
| [CrimeType](./bitburner.crimetype.md) | |
|
||||||
| [FactionWorkType](./bitburner.factionworktype.md) | |
|
| [FactionWorkType](./bitburner.factionworktype.md) | |
|
||||||
| [GymType](./bitburner.gymtype.md) | |
|
| [GymType](./bitburner.gymtype.md) | |
|
||||||
@@ -98,6 +99,7 @@
|
|||||||
| [SleevePerson](./bitburner.sleeveperson.md) | |
|
| [SleevePerson](./bitburner.sleeveperson.md) | |
|
||||||
| [SourceFileLvl](./bitburner.sourcefilelvl.md) | |
|
| [SourceFileLvl](./bitburner.sourcefilelvl.md) | |
|
||||||
| [Stanek](./bitburner.stanek.md) | Stanek's Gift API. |
|
| [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> |
|
| [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) |
|
| [StockOrderObject](./bitburner.stockorderobject.md) | Value in map of [StockOrder](./bitburner.stockorder.md) |
|
||||||
| [TailProperties](./bitburner.tailproperties.md) | |
|
| [TailProperties](./bitburner.tailproperties.md) | |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## NS.getSharePower() method
|
## 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:**
|
**Signature:**
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export async function main(ns) {
|
|||||||
await ns.hack('n00dles');
|
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
|
## 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. |
|
| [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. |
|
| [getServerSecurityLevel(host)](./bitburner.ns.getserversecuritylevel.md) | Get server security level. |
|
||||||
| [getServerUsedRam(host)](./bitburner.ns.getserverusedram.md) | Get the used RAM on a server. |
|
| [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. |
|
| [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. |
|
| [getTotalScriptExpGain()](./bitburner.ns.gettotalscriptexpgain.md) | Get the exp gain of all scripts. |
|
||||||
| [getTotalScriptIncome()](./bitburner.ns.gettotalscriptincome.md) | Get the income of all scripts. |
|
| [getTotalScriptIncome()](./bitburner.ns.gettotalscriptincome.md) | Get the income of all scripts. |
|
||||||
|
|||||||
@@ -19,5 +19,5 @@ Promise<void>
|
|||||||
|
|
||||||
RAM cost: 2.4 GB
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ export type NSEnums = {
|
|||||||
LocationName: typeof LocationName;
|
LocationName: typeof LocationName;
|
||||||
ToastVariant: typeof ToastVariant;
|
ToastVariant: typeof ToastVariant;
|
||||||
UniversityClassType: typeof UniversityClassType;
|
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)
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,5 @@
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
jobs: Record<string, string>;
|
jobs: Partial<Record<CompanyName, JobName>>;
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ interface Player extends Person
|
|||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| [entropy](./bitburner.player.entropy.md) | | number | |
|
| [entropy](./bitburner.player.entropy.md) | | number | |
|
||||||
| [factions](./bitburner.player.factions.md) | | string\[\] | |
|
| [factions](./bitburner.player.factions.md) | | string\[\] | |
|
||||||
| [jobs](./bitburner.player.jobs.md) | | Record<string, string> | |
|
| [jobs](./bitburner.player.jobs.md) | | Partial<Record<[CompanyName](./bitburner.companyname.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->>> | |
|
||||||
| [location](./bitburner.player.location.md) | | string | |
|
| [location](./bitburner.player.location.md) | | string | |
|
||||||
| [money](./bitburner.player.money.md) | | number | |
|
| [money](./bitburner.player.money.md) | | number | |
|
||||||
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |
|
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ interface ResetInfo
|
|||||||
| [currentNode](./bitburner.resetinfo.currentnode.md) | | number | The current bitnode |
|
| [currentNode](./bitburner.resetinfo.currentnode.md) | | number | The current bitnode |
|
||||||
| [lastAugReset](./bitburner.resetinfo.lastaugreset.md) | | number | Numeric timestamp (from Date.now()) of last augmentation reset |
|
| [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 |
|
| [lastNodeReset](./bitburner.resetinfo.lastnodereset.md) | | number | Numeric timestamp (from Date.now()) of last bitnode reset |
|
||||||
|
| [ownedAugs](./bitburner.resetinfo.ownedaugs.md) | | Map<string, number> | 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<number, number> | A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. |
|
||||||
|
|
||||||
|
|||||||
13
markdown/bitburner.resetinfo.ownedaugs.md
Normal file
13
markdown/bitburner.resetinfo.ownedaugs.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [ResetInfo](./bitburner.resetinfo.md) > [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>;
|
||||||
|
```
|
||||||
13
markdown/bitburner.resetinfo.ownedsf.md
Normal file
13
markdown/bitburner.resetinfo.ownedsf.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [ResetInfo](./bitburner.resetinfo.md) > [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>;
|
||||||
|
```
|
||||||
@@ -9,14 +9,14 @@ Apply for a job at a company.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
applyToCompany(companyName: string, field: string): boolean;
|
applyToCompany(companyName: CompanyName | `${CompanyName}`, field: string): boolean;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| 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. |
|
| field | string | Field to which you want to apply. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|||||||
32
markdown/bitburner.singularity.getaugmentationfactions.md
Normal file
32
markdown/bitburner.singularity.getaugmentationfactions.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [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.
|
||||||
|
|
||||||
@@ -9,14 +9,14 @@ Get company favor.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getCompanyFavor(companyName: string): number;
|
getCompanyFavor(companyName: CompanyName | `${CompanyName}`): number;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| companyName | string | Name of the company. |
|
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Get company favor gain.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getCompanyFavorGain(companyName: string): number;
|
getCompanyFavorGain(companyName: CompanyName | `${CompanyName}`): number;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| companyName | string | Name of the company. |
|
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -9,15 +9,18 @@ Get Requirements for Company Position.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getCompanyPositionInfo(companyName: string, positionName: JobName): CompanyPositionInfo;
|
getCompanyPositionInfo(
|
||||||
|
companyName: CompanyName | `${CompanyName}`,
|
||||||
|
positionName: JobName | `${JobName}`,
|
||||||
|
): CompanyPositionInfo;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| companyName | string | Name of company 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) | Name of position 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:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Get List of Company Positions.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getCompanyPositions(companyName: string): JobName[];
|
getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| 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:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Get company reputation.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
getCompanyRep(companyName: string): number;
|
getCompanyRep(companyName: CompanyName | `${CompanyName}`): number;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| companyName | string | Name of the company. |
|
| companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -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. |
|
| [exportGame()](./bitburner.singularity.exportgame.md) | Backup game save. |
|
||||||
| [exportGameBonus()](./bitburner.singularity.exportgamebonus.md) | Returns Backup save bonus availability. |
|
| [exportGameBonus()](./bitburner.singularity.exportgamebonus.md) | Returns Backup save bonus availability. |
|
||||||
| [getAugmentationBasePrice(augName)](./bitburner.singularity.getaugmentationbaseprice.md) | Get base price of an augmentation. |
|
| [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. |
|
| [getAugmentationPrereq(augName)](./bitburner.singularity.getaugmentationprereq.md) | Get the pre-requisite of an augmentation. |
|
||||||
| [getAugmentationPrice(augName)](./bitburner.singularity.getaugmentationprice.md) | Get price 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. |
|
| [getAugmentationRepReq(augName)](./bitburner.singularity.getaugmentationrepreq.md) | Get reputation requirement of an augmentation. |
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Quit jobs by company.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
quitJob(companyName?: string): void;
|
quitJob(companyName?: CompanyName | `${CompanyName}`): void;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| 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:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ Work for a company.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
workForCompany(companyName: string, focus?: boolean): boolean;
|
workForCompany(companyName: CompanyName, focus?: boolean): boolean;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| 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. |
|
| focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Set a sleeve to work for a company.
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
|
setToCompanyWork(sleeveNumber: number, companyName: CompanyName | `${CompanyName}`): boolean;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@@ -17,7 +17,7 @@ setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| sleeveNumber | number | Index of the sleeve to work for the company. |
|
| 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:**
|
**Returns:**
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,7 @@
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
type SleeveCompanyTask = { type: "COMPANY"; companyName: string };
|
type SleeveCompanyTask = { type: "COMPANY"; companyName: CompanyName };
|
||||||
```
|
```
|
||||||
|
**References:** [CompanyName](./bitburner.companyname.md)
|
||||||
|
|
||||||
|
|||||||
13
markdown/bitburner.stockmarketconstants.marketdata4scost.md
Normal file
13
markdown/bitburner.stockmarketconstants.marketdata4scost.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [MarketData4SCost](./bitburner.stockmarketconstants.marketdata4scost.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.MarketData4SCost property
|
||||||
|
|
||||||
|
Cost of the 4S Market Data
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
MarketData4SCost: number;
|
||||||
|
```
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [MarketDataTixApi4SCost](./bitburner.stockmarketconstants.marketdatatixapi4scost.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.MarketDataTixApi4SCost property
|
||||||
|
|
||||||
|
Cost of the 4S Market Data TIX API integration
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
MarketDataTixApi4SCost: number;
|
||||||
|
```
|
||||||
27
markdown/bitburner.stockmarketconstants.md
Normal file
27
markdown/bitburner.stockmarketconstants.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [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 |
|
||||||
|
|
||||||
13
markdown/bitburner.stockmarketconstants.msperstockupdate.md
Normal file
13
markdown/bitburner.stockmarketconstants.msperstockupdate.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [msPerStockUpdate](./bitburner.stockmarketconstants.msperstockupdate.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.msPerStockUpdate property
|
||||||
|
|
||||||
|
Normal time in ms between stock market updates
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
msPerStockUpdate: number;
|
||||||
|
```
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [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;
|
||||||
|
```
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [StockMarketCommission](./bitburner.stockmarketconstants.stockmarketcommission.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.StockMarketCommission property
|
||||||
|
|
||||||
|
Commission fee for transactions
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
StockMarketCommission: number;
|
||||||
|
```
|
||||||
13
markdown/bitburner.stockmarketconstants.tickspercycle.md
Normal file
13
markdown/bitburner.stockmarketconstants.tickspercycle.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [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;
|
||||||
|
```
|
||||||
13
markdown/bitburner.stockmarketconstants.tixapicost.md
Normal file
13
markdown/bitburner.stockmarketconstants.tixapicost.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [TIXAPICost](./bitburner.stockmarketconstants.tixapicost.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.TIXAPICost property
|
||||||
|
|
||||||
|
Cost of the TIX API
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
TIXAPICost: number;
|
||||||
|
```
|
||||||
13
markdown/bitburner.stockmarketconstants.wseaccountcost.md
Normal file
13
markdown/bitburner.stockmarketconstants.wseaccountcost.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [StockMarketConstants](./bitburner.stockmarketconstants.md) > [WSEAccountCost](./bitburner.stockmarketconstants.wseaccountcost.md)
|
||||||
|
|
||||||
|
## StockMarketConstants.WSEAccountCost property
|
||||||
|
|
||||||
|
Cost of the WSE account
|
||||||
|
|
||||||
|
**Signature:**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
WSEAccountCost: number;
|
||||||
|
```
|
||||||
21
markdown/bitburner.tix.getconstants.md
Normal file
21
markdown/bitburner.tix.getconstants.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||||
|
|
||||||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [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
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ export interface TIX
|
|||||||
| [cancelOrder(sym, shares, price, type, pos)](./bitburner.tix.cancelorder.md) | Cancel order for stocks. |
|
| [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. |
|
| [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. |
|
| [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 stock’s price will increase (as opposed to decrease) during the next tick. |
|
| [getForecast(sym)](./bitburner.tix.getforecast.md) | Returns the probability that the specified stock’s 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. |
|
| [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. |
|
| [getOrders()](./bitburner.tix.getorders.md) | Returns your order book for the stock market. |
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
**Signature:**
|
**Signature:**
|
||||||
|
|
||||||
```typescript
|
```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
|
## Parameters
|
||||||
@@ -15,7 +20,7 @@ companyGains(person: Person, companyName: string, workType: JobName | `${JobName
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| person | [Person](./bitburner.person.md) | |
|
| 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)<!-- -->}\` | |
|
| workType | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | |
|
||||||
| favor | number | |
|
| favor | number | |
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bitburner",
|
"name": "bitburner",
|
||||||
"version": "2.3.2dev",
|
"version": "2.4.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bitburner",
|
"name": "bitburner",
|
||||||
"version": "2.3.2dev",
|
"version": "2.4.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "SEE LICENSE IN license.txt",
|
"license": "SEE LICENSE IN license.txt",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "bitburner",
|
"name": "bitburner",
|
||||||
"license": "SEE LICENSE IN license.txt",
|
"license": "SEE LICENSE IN license.txt",
|
||||||
"version": "2.3.2dev",
|
"version": "2.4.1",
|
||||||
"main": "electron-main.js",
|
"main": "electron-main.js",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Daniel Xie, Olivier Gagnon, et al."
|
"name": "Daniel Xie, Olivier Gagnon, et al."
|
||||||
@@ -102,13 +102,13 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/danielyxie/bitburner",
|
"homepage": "https://bitburner-official.github.io/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/danielyxie/bitburner.git"
|
"url": "git+https://github.com/bitburner-official/bitburner-src.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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": "prettier -c --write .",
|
||||||
"format:report": "prettier -c .",
|
"format:report": "prettier -c .",
|
||||||
"start": "cd .app && http-server -p 8000",
|
"start": "cd .app && http-server -p 8000",
|
||||||
@@ -127,7 +127,6 @@
|
|||||||
"preversion": "npm install && npm run test",
|
"preversion": "npm install && npm run test",
|
||||||
"version": "sh ./tools/build-release.sh && git add --all",
|
"version": "sh ./tools/build-release.sh && git add --all",
|
||||||
"postversion": "git push -u origin dev && git push --tags",
|
"postversion": "git push -u origin dev && git push --tags",
|
||||||
"changelog": "node tools/fetch-changelog/index.js --from=$(cat last_changelog_hash) > changelog.md",
|
"changelog": "node tools/fetch-changelog/index.js --from=$(cat last_changelog_hash) > changelog.md"
|
||||||
"bundle-doc": "node tools/bundle-doc/index.js"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,4 +227,8 @@ export class Augmentation {
|
|||||||
const queuedNFGLevel = Player.queuedAugmentations.filter((aug) => aug.name === this.name).length;
|
const queuedNFGLevel = Player.queuedAugmentations.filter((aug) => aug.name === this.name).length;
|
||||||
return ownedNFGLevel + queuedNFGLevel;
|
return ownedNFGLevel + queuedNFGLevel;
|
||||||
}
|
}
|
||||||
|
/** Get the next level of an augmentation to buy. Currently only relevant for NFG. */
|
||||||
|
getNextLevel(): number {
|
||||||
|
return this.getLevel() + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
export enum AugmentationName {
|
export enum AugmentationName {
|
||||||
|
NeuroFluxGovernor = "NeuroFlux Governor",
|
||||||
Targeting1 = "Augmented Targeting I",
|
Targeting1 = "Augmented Targeting I",
|
||||||
Targeting2 = "Augmented Targeting II",
|
Targeting2 = "Augmented Targeting II",
|
||||||
Targeting3 = "Augmented Targeting III",
|
Targeting3 = "Augmented Targeting III",
|
||||||
@@ -55,7 +56,6 @@ export enum AugmentationName {
|
|||||||
HacknetNodeNICUpload = "Hacknet Node NIC Architecture Neural-Upload",
|
HacknetNodeNICUpload = "Hacknet Node NIC Architecture Neural-Upload",
|
||||||
HacknetNodeKernelDNI = "Hacknet Node Kernel Direct-Neural Interface",
|
HacknetNodeKernelDNI = "Hacknet Node Kernel Direct-Neural Interface",
|
||||||
HacknetNodeCoreDNI = "Hacknet Node Core Direct-Neural Interface",
|
HacknetNodeCoreDNI = "Hacknet Node Core Direct-Neural Interface",
|
||||||
NeuroFluxGovernor = "NeuroFlux Governor",
|
|
||||||
Neurotrainer1 = "Neurotrainer I",
|
Neurotrainer1 = "Neurotrainer I",
|
||||||
Neurotrainer2 = "Neurotrainer II",
|
Neurotrainer2 = "Neurotrainer II",
|
||||||
Neurotrainer3 = "Neurotrainer III",
|
Neurotrainer3 = "Neurotrainer III",
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ const NeuroFluxDisplay = (): React.ReactElement => {
|
|||||||
<Typography variant="h5" color={Settings.theme.info}>
|
<Typography variant="h5" color={Settings.theme.info}>
|
||||||
NeuroFlux Governor - Level {level}
|
NeuroFlux Governor - Level {level}
|
||||||
</Typography>
|
</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}>
|
<Typography color={Settings.theme.info}>
|
||||||
The power of {AugmentationName.NeuroFluxGovernor} increases with blood donations from players in real life.
|
The power of {AugmentationName.NeuroFluxGovernor} increases with blood donations from players in real life.
|
||||||
Learn more <Link onClick={openBloodDonation}>here</Link>
|
Learn more <Link onClick={openBloodDonation}>here</Link>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export function InstalledAugmentations(): React.ReactElement {
|
|||||||
<Typography variant="h6" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
|
<Typography variant="h6" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
|
||||||
{selectedAug.name}
|
{selectedAug.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ maxHeight: 350, overflowY: "scroll" }}>
|
<Typography sx={{ maxHeight: 350, overflowY: "scroll", whiteSpace: "pre-wrap" }}>
|
||||||
{(() => {
|
{(() => {
|
||||||
const aug = Augmentations[selectedAug.name];
|
const aug = Augmentations[selectedAug.name];
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
|
|||||||
{aug.name}
|
{aug.name}
|
||||||
{aug.name === AugmentationName.NeuroFluxGovernor && ` - Level ${augLevel + 1}`}
|
{aug.name === AugmentationName.NeuroFluxGovernor && ` - Level ${augLevel + 1}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography>{description}</Typography>
|
<Typography whiteSpace={"pre-wrap"}>{description}</Typography>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function PurchaseAugmentationModal({ aug, faction, onClose, open }: IProp
|
|||||||
return (
|
return (
|
||||||
<Modal open={open} onClose={onClose}>
|
<Modal open={open} onClose={onClose}>
|
||||||
<Typography variant="h4">{aug.name}</Typography>
|
<Typography variant="h4">{aug.name}</Typography>
|
||||||
<Typography>
|
<Typography whiteSpace={"pre-wrap"}>
|
||||||
{aug.info}
|
{aug.info}
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function PurchasedAugmentations(): React.ReactElement {
|
|||||||
augs.push(
|
augs.push(
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<Typography>
|
<Typography whiteSpace={"pre-wrap"}>
|
||||||
{(() => {
|
{(() => {
|
||||||
const info = typeof aug.info === "string" ? <span>{aug.info}</span> : aug.info;
|
const info = typeof aug.info === "string" ? <span>{aug.info}</span> : aug.info;
|
||||||
const tooltip = (
|
const tooltip = (
|
||||||
|
|||||||
@@ -40,10 +40,17 @@ export function ActionLevel({ action, isActive, bladeburner, rerender }: IProps)
|
|||||||
<Box display="flex">
|
<Box display="flex">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
<Typography>
|
action.constructor.name === "Contract" ? (
|
||||||
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed
|
<Typography>
|
||||||
for next level
|
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed
|
||||||
</Typography>
|
for next level
|
||||||
|
</Typography>
|
||||||
|
) : (
|
||||||
|
<Typography>
|
||||||
|
{action.getSuccessesNeededForNextLevel(BladeburnerConstants.OperationSuccessesPerLevel)} successes
|
||||||
|
needed for next level
|
||||||
|
</Typography>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography>
|
<Typography>
|
||||||
|
|||||||
@@ -31,11 +31,6 @@ export const CONSTANTS: {
|
|||||||
PurchasedServerMaxRam: number;
|
PurchasedServerMaxRam: number;
|
||||||
MultipleAugMultiplier: number;
|
MultipleAugMultiplier: number;
|
||||||
TorRouterCost: number;
|
TorRouterCost: number;
|
||||||
WSEAccountCost: number;
|
|
||||||
TIXAPICost: number;
|
|
||||||
MarketData4SCost: number;
|
|
||||||
MarketDataTixApi4SCost: number;
|
|
||||||
StockMarketCommission: number;
|
|
||||||
HospitalCostPerHp: number;
|
HospitalCostPerHp: number;
|
||||||
IntelligenceCrimeWeight: number;
|
IntelligenceCrimeWeight: number;
|
||||||
IntelligenceInfiltrationWeight: number;
|
IntelligenceInfiltrationWeight: number;
|
||||||
@@ -88,9 +83,9 @@ export const CONSTANTS: {
|
|||||||
Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG
|
Donations: number; // number of blood/plasma/palette donation the dev have verified., boosts NFG
|
||||||
LatestUpdate: string;
|
LatestUpdate: string;
|
||||||
} = {
|
} = {
|
||||||
VersionString: "2.3.2",
|
VersionString: "2.4.1",
|
||||||
isDevBranch: true,
|
isDevBranch: false,
|
||||||
VersionNumber: 32,
|
VersionNumber: 34,
|
||||||
|
|
||||||
/** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
|
/** 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
|
* 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
|
// TOR Router
|
||||||
TorRouterCost: 200e3,
|
TorRouterCost: 200e3,
|
||||||
|
|
||||||
// Stock market
|
|
||||||
WSEAccountCost: 200e6,
|
|
||||||
TIXAPICost: 5e9,
|
|
||||||
MarketData4SCost: 1e9,
|
|
||||||
MarketDataTixApi4SCost: 25e9,
|
|
||||||
StockMarketCommission: 100e3,
|
|
||||||
|
|
||||||
// Hospital/Health
|
// Hospital/Health
|
||||||
HospitalCostPerHp: 100e3,
|
HospitalCostPerHp: 100e3,
|
||||||
|
|
||||||
@@ -227,42 +215,48 @@ export const CONSTANTS: {
|
|||||||
|
|
||||||
InfiniteLoopLimit: 2000,
|
InfiniteLoopLimit: 2000,
|
||||||
|
|
||||||
Donations: 79,
|
Donations: 113,
|
||||||
|
|
||||||
// Also update doc/source/changelog.rst
|
// Also update doc/source/changelog.rst
|
||||||
LatestUpdate: `
|
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)
|
### BUGFIX:
|
||||||
* 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
|
|
||||||
|
|
||||||
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)
|
### API CHANGES (NON-SPOILER)
|
||||||
* ns.corporation.getProduct now provides investment amounts (@Snarling)
|
|
||||||
* Invalid materials for a division can no longer be bought through the API. (@Snarling)
|
- Added ns.stock.getConstants (@Snarling)
|
||||||
* Fixed a React error that could occur if a division had invalid materials. (@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)
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export function IssueNewSharesModal(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
let dialogContents =
|
let dialogContents =
|
||||||
`Issued ${formatShares(newShares)} new shares` + ` and raised ${formatMoney(profit)}.` + (privateShares > 0)
|
`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)}`;
|
dialogContents += `\n\nStock price decreased to ${formatMoney(corp.sharePrice)}`;
|
||||||
dialogBoxCreate(dialogContents);
|
dialogBoxCreate(dialogContents);
|
||||||
|
|||||||
3
src/Documentation/doc/advanced/corporations.md
Normal file
3
src/Documentation/doc/advanced/corporations.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Corporations
|
||||||
|
|
||||||
|
PLACEHOLDER
|
||||||
@@ -1,7 +1,91 @@
|
|||||||
.. \_changelog:
|
|
||||||
|
|
||||||
# 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
|
## v2.3.1 - Bugfixes 7 June 2023
|
||||||
|
|
||||||
NETSCRIPT:
|
NETSCRIPT:
|
||||||
@@ -240,7 +324,7 @@ GRAFTING:
|
|||||||
DOCUMENTATION
|
DOCUMENTATION
|
||||||
|
|
||||||
- Many documentation updates (@Mughur, @d0sboots, @Snarling, @teauxfu).
|
- 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 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
|
- 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)
|
- 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)
|
- 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)
|
- All the player sub-objects need to be copied for `getPlayer`. (by @MageKing17)
|
||||||
- add corp get<constant> functions, UI (by @Mughur)
|
- add corp get<constant> functions, UI (by @Mughur)
|
||||||
- [danielyxie/bitburner#3860] destroyW0r1dD43m0n now properly gives achievements
|
- destroyW0r1dD43m0n now properly gives achievements
|
||||||
- [danielyxie/bitburner#3890] favor now properly syncs across pages and the Donate achievement is now given correctly (by @Aerophia)
|
- 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)
|
- getCrimeStats use bitnode multipliers in the output of crime stats (by @phyzical)
|
||||||
- add singularity function for exporting game save back (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)
|
- inconsistent probability for generation between online and offline (by @quacksouls)
|
||||||
- Don't stringify answer if already a string (by @alainbryden)
|
- 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
|
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)
|
- Gave investors some economics classes (by @Mughur)
|
||||||
- Limit shareholder priority on newly issued shares (by @Undeemiss)
|
- Limit shareholder priority on newly issued shares (by @Undeemiss)
|
||||||
- dont take research points for something already researched via api (by @phyzical)
|
- dont take research points for something already researched via api (by @phyzical)
|
||||||
@@ -478,14 +562,14 @@ CORPORATION
|
|||||||
CORPORATION API
|
CORPORATION API
|
||||||
|
|
||||||
- Fix up param order for limitProductProduction to match docs (by @phyzical)
|
- 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
|
DOCUMENTATION
|
||||||
|
|
||||||
- update docs a bit more, amending some BN and SF texts (by @Mughur)
|
- update docs a bit more, amending some BN and SF texts (by @Mughur)
|
||||||
- Fixed Argument order for scp() (by @njalooo)
|
- Fixed Argument order for scp() (by @njalooo)
|
||||||
- Some typo fixes in Netscript functions (by @quacksouls)
|
- 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 description of Caesar cipher (by @quacksouls)
|
||||||
- typo fix in terminal.rst (by @BugiDev)
|
- typo fix in terminal.rst (by @BugiDev)
|
||||||
- Update bitburner.sleeve.settobladeburneraction.md (by @borisflagell)
|
- Update bitburner.sleeve.settobladeburneraction.md (by @borisflagell)
|
||||||
@@ -496,32 +580,31 @@ DOCUMENTATION
|
|||||||
NETSCRIPT
|
NETSCRIPT
|
||||||
|
|
||||||
- Added functions to resize, move, and close tail windows
|
- Added functions to resize, move, and close tail windows
|
||||||
- [danielyxie/bitburner#2376] ns.exit now exits immediately (by @Snarling)
|
- ns.exit now exits immediately (by @Snarling)
|
||||||
- [danielyxie/bitburner#4055] Fix dynamic ram check (by @Snarling)
|
- Fix dynamic ram check (by @Snarling)
|
||||||
- [danielyxie/bitburner#4037] ns1 wraps deeper layers correctly. (by @Snarling)
|
- ns1 wraps deeper layers correctly. (by @Snarling)
|
||||||
- [danielyxie/bitburner#3963] Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K)
|
- Prevent bladeburner.setActionLevel from setting invalid action levels (by @MPJ-K)
|
||||||
- Typo fixes in CodingContract, Hacknet, Singularity APIs (by @quacksouls)
|
- Typo fixes in CodingContract, Hacknet, Singularity APIs (by @quacksouls)
|
||||||
- Fix a typo in doc of Singularity.travelToCity() (by @quacksouls)
|
- Fix a typo in doc of Singularity.travelToCity() (by @quacksouls)
|
||||||
- Update netscript definition file for scp, write, read, and flags (by @Snarling)
|
- Update netscript definition file for scp, write, read, and flags (by @Snarling)
|
||||||
- Correct missing ! for boolean coercion in Corporation.createCorporation(). (by @Risenafis)
|
- Correct missing ! for boolean coercion in Corporation.createCorporation(). (by @Risenafis)
|
||||||
- Normalized Stock API logging (by @Snarling)
|
- 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)
|
- Correct missing `!` for boolean coercion in `singularity.workForCompany()`. (by @MageKing17)
|
||||||
- ns.scp and ns.write are now synchronous + fix exec race condition (by @Snarling)
|
- 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)
|
- 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)
|
- 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)
|
- 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)
|
- The correct script will be closed even if the player modifies args (v2.0) (by @Snarling)
|
||||||
- Corrected ns formula for infiltration rewards (by @ezylot)
|
- Corrected ns formula for infiltration rewards (by @ezylot)
|
||||||
- Add singularity check for finishing company work (by @Snarling)
|
- Add singularity check for finishing company work (by @Snarling)
|
||||||
|
|
||||||
SLEEVES
|
SLEEVES
|
||||||
|
|
||||||
- [danielyxie/bitburner#3819] Allow using the regeneration chamber with sleeves to heal them. (by @coderanger)
|
- 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)
|
- 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)
|
- 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)
|
|
||||||
- Sleeve crime gain bitnode multiplier fix (by @Mughur)
|
- Sleeve crime gain bitnode multiplier fix (by @Mughur)
|
||||||
|
|
||||||
REMOTE FILE API
|
REMOTE FILE API
|
||||||
@@ -531,30 +614,30 @@ REMOTE FILE API
|
|||||||
|
|
||||||
UI
|
UI
|
||||||
|
|
||||||
- [danielyxie/bitburner#2962] add a setting to display middle time unit in Time Elapsed String (by @hydroflame)
|
- 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)
|
- fix incorrect experience display in Crime UI. (by @SilverNexus)
|
||||||
- Bitnode stats now show if BB/Corporation are disabled (by @Kelenius)
|
- Bitnode stats now show if BB/Corporation are disabled (by @Kelenius)
|
||||||
- Removed three empty lines from BB status screen (by @Kelenius)
|
- Removed three empty lines from BB status screen (by @Kelenius)
|
||||||
- Add missing space to BN7 description (by @hex7cd)
|
- Add missing space to BN7 description (by @hex7cd)
|
||||||
- Improvements to crime work UI (by @Kelenius)
|
- 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
|
MISC
|
||||||
|
|
||||||
- Added weight to GangMemberTask construction call (by @ezylot)
|
- Added weight to GangMemberTask construction call (by @ezylot)
|
||||||
- Fix ANSI display bugs (by @Snarling)
|
- Fix ANSI display bugs (by @Snarling)
|
||||||
- Debounce updateRAM calls in script editor. (by @Snarling)
|
- Debounce updateRAM calls in script editor. (by @Snarling)
|
||||||
- [danielyxie/bitburner#3979] Allow characters & and ' in filenames (by @Snarling)
|
- Allow characters & and ' in filenames (by @Snarling)
|
||||||
- [danielyxie/bitburner#3965] Corrected tutorial text (by @mihilt)
|
- Corrected tutorial text (by @mihilt)
|
||||||
- Fix infil definitions.d.ts (by @phyzical)
|
- Fix infil definitions.d.ts (by @phyzical)
|
||||||
- Modify PR template (by @Hoekstraa)
|
- Modify PR template (by @Hoekstraa)
|
||||||
- crime gains, sleeve gang augs and faq (by @Mughur)
|
- 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)
|
- Adds Shadows of Anarchy (by @Lagicrus)
|
||||||
- Added intormation about hacking managers to hacking algorithms page (by @Kelenius)
|
- Added intormation about hacking managers to hacking algorithms page (by @Kelenius)
|
||||||
- Fix Jest CI Error (by @geggleto)
|
- Fix Jest CI Error (by @geggleto)
|
||||||
- multiple hasAugmentation checks didn't check if the augment was installed (by @Mughur)
|
- 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)
|
- Adds info regarding augments and focus (by @Lagicrus)
|
||||||
- Removed console.log line (by @dhosborne)
|
- Removed console.log line (by @dhosborne)
|
||||||
- Update some doc (by @hydroflame)
|
- Update some doc (by @hydroflame)
|
||||||
@@ -1213,7 +1296,7 @@ Stanek Gift
|
|||||||
** Documentation **
|
** Documentation **
|
||||||
|
|
||||||
- The new documentation for the netscript API is available at
|
- 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
|
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.
|
for users to reference. This is a huge quality of life improvements for me.
|
||||||
|
|
||||||
@@ -1263,7 +1346,7 @@ Stanek Gift
|
|||||||
** Announcement **
|
** Announcement **
|
||||||
|
|
||||||
- Several API breaks have been implemented.
|
- 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.
|
- Everyone gets 10 free neuroflux level.
|
||||||
|
|
||||||
** Netscript **
|
** Netscript **
|
||||||
@@ -2642,8 +2725,6 @@ Stanek Gift
|
|||||||
|
|
||||||
- Added a very rudimentary directory system to the Terminal
|
- 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
|
- 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 is now more expensive
|
||||||
- 'Generate Coding Contract' hash upgrade now generates the contract randomly on the server, rather than on home computer
|
- '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')
|
- 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)
|
- 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
|
- 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)
|
- 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)
|
- Skill level calculation is now 'smoother' (by Github user hydroflame)
|
||||||
- Added a button to 'beautify' scripts in the text editor (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
|
## 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
|
- 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
|
## v0.36.1 - 5/11/2018
|
||||||
@@ -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.
|
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:
|
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:
|
Then, to fix your script, make sure you have a `sleep()` or any other timed function like `hack()` or `grow()` in any infinite loops:
|
||||||
|
|
||||||
@@ -3,35 +3,24 @@ import React from "react";
|
|||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import { MD } from "../../ui/MD/MD";
|
import { MD } from "../../ui/MD/MD";
|
||||||
|
|
||||||
import { getPage } from "./root";
|
import { getPage } from "../root";
|
||||||
import { Navigator, useHistory } from "../../ui/React/Documentation";
|
import { Navigator, useHistory } from "../../ui/React/Documentation";
|
||||||
import { CONSTANTS } from "../../Constants";
|
import { CONSTANTS } from "../../Constants";
|
||||||
|
import { resolveFilePath } from "../../Paths/FilePath";
|
||||||
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);
|
|
||||||
};
|
|
||||||
|
|
||||||
export function DocumentationRoot(): React.ReactElement {
|
export function DocumentationRoot(): React.ReactElement {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const page = getPage(history.page);
|
const page = getPage(history.page);
|
||||||
const navigator = {
|
const navigator = {
|
||||||
navigate(relPath: string, external: boolean) {
|
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) {
|
if (external) {
|
||||||
const ver = CONSTANTS.isDevBranch ? "dev" : "stable";
|
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");
|
window.open(url, "_newtab");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
|
|||||||
} else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {
|
} else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {
|
||||||
const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
|
const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
|
||||||
if (aug.name == AugmentationName.NeuroFluxGovernor) {
|
if (aug.name == AugmentationName.NeuroFluxGovernor) {
|
||||||
queuedAugmentation.level = aug.getLevel();
|
queuedAugmentation.level = aug.getNextLevel();
|
||||||
}
|
}
|
||||||
Player.queuedAugmentations.push(queuedAugmentation);
|
Player.queuedAugmentations.push(queuedAugmentation);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
import {
|
import { BugReport, Chat, Download, LibraryBooks, Palette, Reddit, Save, Upload } from "@mui/icons-material";
|
||||||
BugReport,
|
|
||||||
Chat,
|
|
||||||
Download,
|
|
||||||
LibraryBooks,
|
|
||||||
Palette,
|
|
||||||
Reddit,
|
|
||||||
Save,
|
|
||||||
SystemUpdateAlt,
|
|
||||||
Upload,
|
|
||||||
} from "@mui/icons-material";
|
|
||||||
import { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from "@mui/material";
|
import { Box, Button, List, ListItemButton, Paper, Tooltip, Typography } from "@mui/material";
|
||||||
import { default as React, useRef, useState } from "react";
|
import { default as React, useRef, useState } from "react";
|
||||||
import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal";
|
import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal";
|
||||||
@@ -239,7 +229,7 @@ export const GameOptionsSidebar = (props: IProps): React.ReactElement => {
|
|||||||
sx={{
|
sx={{
|
||||||
gridArea: "links",
|
gridArea: "links",
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateAreas: `"bug changelog"
|
gridTemplateAreas: `"bug bug"
|
||||||
"discord reddit"
|
"discord reddit"
|
||||||
"tut tut"
|
"tut tut"
|
||||||
"plaza plaza"`,
|
"plaza plaza"`,
|
||||||
@@ -255,14 +245,6 @@ export const GameOptionsSidebar = (props: IProps): React.ReactElement => {
|
|||||||
>
|
>
|
||||||
Report Bug
|
Report Bug
|
||||||
</Button>
|
</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" }}>
|
<Button startIcon={<LibraryBooks />} onClick={() => setConfirmResetOpen(true)} sx={{ gridArea: "tut" }}>
|
||||||
Reset tutorial
|
Reset tutorial
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -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>
|
</GameOptionsPage>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ export const RemoteAPIPage = (): React.ReactElement => {
|
|||||||
text editor and then upload files to the home server.
|
text editor and then upload files to the home server.
|
||||||
</Typography>
|
</Typography>
|
||||||
<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
|
Documentation
|
||||||
</Link>
|
</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Array.from({ length: wires.length }).map((_, i) => {
|
{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;
|
const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary;
|
||||||
return (
|
return (
|
||||||
<Typography key={i} style={{ color: color }}>
|
<Typography key={i} style={{ color: color }}>
|
||||||
@@ -148,7 +148,7 @@ export function WireCuttingGame({ onSuccess, onFailure, difficulty }: IMinigameP
|
|||||||
if ((i === 3 || i === 4) && cutWires[j]) {
|
if ((i === 3 || i === 4) && cutWires[j]) {
|
||||||
return <Typography key={j}></Typography>;
|
return <Typography key={j}></Typography>;
|
||||||
}
|
}
|
||||||
const isCorrectWire = cutWires[j + 1] || wiresToCut.has(j + 1);
|
const isCorrectWire = cutWires[j] || wiresToCut.has(j);
|
||||||
const wireColor =
|
const wireColor =
|
||||||
hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length];
|
hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length];
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ export const Literatures: Record<LiteratureName, Literature> = {
|
|||||||
title: "The Beginner's Guide to Hacking",
|
title: "The Beginner's Guide to Hacking",
|
||||||
filename: LiteratureName.HackersStartingHandbook,
|
filename: LiteratureName.HackersStartingHandbook,
|
||||||
text:
|
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 " +
|
"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>" +
|
"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 " +
|
"-hack() and grow() both work by percentages. hack() steals a certain percentage of the " +
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ class NSProxyHandler<API extends GenericAPI<API>> {
|
|||||||
|
|
||||||
getOwnPropertyDescriptor(__target: unknown, key: keyof API & string): PropertyDescriptor | undefined {
|
getOwnPropertyDescriptor(__target: unknown, key: keyof API & string): PropertyDescriptor | undefined {
|
||||||
if (!this.has(__target, key)) return 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 {
|
defineProperty(__target: unknown, __key: unknown, __attrs: unknown): boolean {
|
||||||
@@ -62,8 +64,9 @@ class NSProxyHandler<API extends GenericAPI<API>> {
|
|||||||
const ours = this.memoed[key];
|
const ours = this.memoed[key];
|
||||||
if (ours) return ours;
|
if (ours) return ours;
|
||||||
|
|
||||||
const field = this.ns[key];
|
const descriptor = Object.getOwnPropertyDescriptor(this.ns, key);
|
||||||
if (!field) return field;
|
if (!descriptor) return descriptor;
|
||||||
|
const field = descriptor.value;
|
||||||
|
|
||||||
if (typeof field === "function") {
|
if (typeof field === "function") {
|
||||||
const arrayPath = [...this.tree, key];
|
const arrayPath = [...this.tree, key];
|
||||||
@@ -75,10 +78,11 @@ class NSProxyHandler<API extends GenericAPI<API>> {
|
|||||||
const wrappedFunction = function (...args: unknown[]): unknown {
|
const wrappedFunction = function (...args: unknown[]): unknown {
|
||||||
// What remains *must* be called every time.
|
// What remains *must* be called every time.
|
||||||
helpers.checkEnvFlags(ctx);
|
helpers.checkEnvFlags(ctx);
|
||||||
helpers.updateDynamicRam(ctx, getRamCost(...arrayPath));
|
helpers.updateDynamicRam(ctx, getRamCost(arrayPath));
|
||||||
return func(...args);
|
return func(...args);
|
||||||
};
|
};
|
||||||
return ((this.memoed[key] as APIFn) = wrappedFunction);
|
Object.defineProperty(this.memoed, key, { ...descriptor, value: wrappedFunction });
|
||||||
|
return wrappedFunction;
|
||||||
}
|
}
|
||||||
if (typeof field === "object") {
|
if (typeof field === "object") {
|
||||||
return ((this.memoed[key] as GenericAPI<API[keyof API]>) = NSProxy(
|
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. */
|
/** Specify when a function was removed from the game, and its replacement function. */
|
||||||
export function removedFunction(version: string, replacement: string, replaceMsg?: boolean) {
|
interface RemovedFunctionInfo {
|
||||||
return (ctx: NetscriptContext) => () => {
|
/** The version in which the function was removed */
|
||||||
throw helpers.makeRuntimeErrorMsg(
|
version: string;
|
||||||
ctx,
|
/** The replacement function to use, or the entire replacement message if replaceMsg is true. */
|
||||||
`Function removed in ${version}. ${replaceMsg ? replacement : `Please use ${replacement} instead.`}`,
|
replacement: string;
|
||||||
"REMOVED FUNCTION",
|
/** 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
Reference in New Issue
Block a user