mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
Merge pull request #1841 from danielyxie/dev
rename functions I just created
This commit is contained in:
commit
63c5387cfe
37
dist/bitburner.d.ts
vendored
37
dist/bitburner.d.ts
vendored
@ -972,13 +972,21 @@ export declare interface EquipmentStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Formulas API
|
||||||
|
* @remarks
|
||||||
|
* You need Formulas.exe on your home computer to use this API.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export declare interface Formulas {
|
export declare interface Formulas {
|
||||||
|
/** Skills formulas */
|
||||||
skills: SkillsFormulas;
|
skills: SkillsFormulas;
|
||||||
|
/** Hacking formulas */
|
||||||
hacking: HackingFormulas;
|
hacking: HackingFormulas;
|
||||||
|
/** Hacknet Nodes formulas */
|
||||||
hacknetNodes: HacknetNodesFormulas;
|
hacknetNodes: HacknetNodesFormulas;
|
||||||
|
/** Hacknet Servers formulas */
|
||||||
hacknetServers: HacknetServersFormulas;
|
hacknetServers: HacknetServersFormulas;
|
||||||
|
/** Gang formulas */
|
||||||
gang: GangFormulas;
|
gang: GangFormulas;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1253,12 +1261,39 @@ export declare interface Gang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gang formulas
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export declare interface GangFormulas {
|
export declare interface GangFormulas {
|
||||||
|
/**
|
||||||
|
* Calculate the wanted penalty.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @returns The calculated wanted penalty.
|
||||||
|
*/
|
||||||
calculateWantedPenalty(gang: GangGenInfo): number;
|
calculateWantedPenalty(gang: GangGenInfo): number;
|
||||||
|
/**
|
||||||
|
* Calculate respect gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated respect gain.
|
||||||
|
*/
|
||||||
calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
|
/**
|
||||||
|
* Calculate wanted gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated wanted gain.
|
||||||
|
*/
|
||||||
calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
|
/**
|
||||||
|
* Calculate money gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated money gain.
|
||||||
|
*/
|
||||||
calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1931,7 +1966,7 @@ export declare interface NS extends Singularity {
|
|||||||
* It is also possible to get the number of arguments that was passed into a script using: 'args.length'
|
* It is also possible to get the number of arguments that was passed into a script using: 'args.length'
|
||||||
* WARNING: Do not try to modify the args array. This will break the game.
|
* WARNING: Do not try to modify the args array. This will break the game.
|
||||||
*/
|
*/
|
||||||
readonly args: (string | number)[];
|
readonly args: (string | number | boolean)[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Steal a servers money.
|
* Steal a servers money.
|
||||||
|
@ -7409,7 +7409,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "Interface",
|
"kind": "Interface",
|
||||||
"canonicalReference": "bitburner!Formulas:interface",
|
"canonicalReference": "bitburner!Formulas:interface",
|
||||||
"docComment": "/**\n * @public\n */\n",
|
"docComment": "/**\n * Formulas API\n *\n * @remarks\n *\n * You need Formulas.exe on your home computer to use this API.\n *\n * @public\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -7422,7 +7422,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "PropertySignature",
|
"kind": "PropertySignature",
|
||||||
"canonicalReference": "bitburner!Formulas#gang:member",
|
"canonicalReference": "bitburner!Formulas#gang:member",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Gang formulas\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -7449,7 +7449,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "PropertySignature",
|
"kind": "PropertySignature",
|
||||||
"canonicalReference": "bitburner!Formulas#hacking:member",
|
"canonicalReference": "bitburner!Formulas#hacking:member",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Hacking formulas\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -7476,7 +7476,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "PropertySignature",
|
"kind": "PropertySignature",
|
||||||
"canonicalReference": "bitburner!Formulas#hacknetNodes:member",
|
"canonicalReference": "bitburner!Formulas#hacknetNodes:member",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Hacknet Nodes formulas\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -7503,7 +7503,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "PropertySignature",
|
"kind": "PropertySignature",
|
||||||
"canonicalReference": "bitburner!Formulas#hacknetServers:member",
|
"canonicalReference": "bitburner!Formulas#hacknetServers:member",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Hacknet Servers formulas\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -7530,7 +7530,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "PropertySignature",
|
"kind": "PropertySignature",
|
||||||
"canonicalReference": "bitburner!Formulas#skills:member",
|
"canonicalReference": "bitburner!Formulas#skills:member",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Skills formulas\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -8563,7 +8563,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "Interface",
|
"kind": "Interface",
|
||||||
"canonicalReference": "bitburner!GangFormulas:interface",
|
"canonicalReference": "bitburner!GangFormulas:interface",
|
||||||
"docComment": "/**\n * @public\n */\n",
|
"docComment": "/**\n * Gang formulas\n *\n * @public\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -8576,7 +8576,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!GangFormulas#calculateMoneyGain:member(1)",
|
"canonicalReference": "bitburner!GangFormulas#calculateMoneyGain:member(1)",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Calculate money gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated money gain.\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -8653,7 +8653,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!GangFormulas#calculateRespectGain:member(1)",
|
"canonicalReference": "bitburner!GangFormulas#calculateRespectGain:member(1)",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Calculate respect gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated respect gain.\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -8730,7 +8730,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!GangFormulas#calculateWantedLevelGain:member(1)",
|
"canonicalReference": "bitburner!GangFormulas#calculateWantedLevelGain:member(1)",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Calculate wanted gain per tick.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n *\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n *\n * @returns The calculated wanted gain.\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -8807,7 +8807,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "MethodSignature",
|
"kind": "MethodSignature",
|
||||||
"canonicalReference": "bitburner!GangFormulas#calculateWantedPenalty:member(1)",
|
"canonicalReference": "bitburner!GangFormulas#calculateWantedPenalty:member(1)",
|
||||||
"docComment": "",
|
"docComment": "/**\n * Calculate the wanted penalty.\n *\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n *\n * @returns The calculated wanted penalty.\n */\n",
|
||||||
"excerptTokens": [
|
"excerptTokens": [
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
@ -14193,7 +14193,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
"text": "(string | number)[]"
|
"text": "(string | number | boolean)[]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Content",
|
"kind": "Content",
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## Formulas.gang property
|
## Formulas.gang property
|
||||||
|
|
||||||
|
Gang formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## Formulas.hacking property
|
## Formulas.hacking property
|
||||||
|
|
||||||
|
Hacking formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## Formulas.hacknetNodes property
|
## Formulas.hacknetNodes property
|
||||||
|
|
||||||
|
Hacknet Nodes formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## Formulas.hacknetServers property
|
## Formulas.hacknetServers property
|
||||||
|
|
||||||
|
Hacknet Servers formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
## Formulas interface
|
## Formulas interface
|
||||||
|
|
||||||
|
Formulas API
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
@ -11,13 +12,17 @@
|
|||||||
export interface Formulas
|
export interface Formulas
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
|
||||||
|
You need Formulas.exe on your home computer to use this API.
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [gang](./bitburner.formulas.gang.md) | [GangFormulas](./bitburner.gangformulas.md) | |
|
| [gang](./bitburner.formulas.gang.md) | [GangFormulas](./bitburner.gangformulas.md) | Gang formulas |
|
||||||
| [hacking](./bitburner.formulas.hacking.md) | [HackingFormulas](./bitburner.hackingformulas.md) | |
|
| [hacking](./bitburner.formulas.hacking.md) | [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
|
||||||
| [hacknetNodes](./bitburner.formulas.hacknetnodes.md) | [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | |
|
| [hacknetNodes](./bitburner.formulas.hacknetnodes.md) | [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | Hacknet Nodes formulas |
|
||||||
| [hacknetServers](./bitburner.formulas.hacknetservers.md) | [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | |
|
| [hacknetServers](./bitburner.formulas.hacknetservers.md) | [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Servers formulas |
|
||||||
| [skills](./bitburner.formulas.skills.md) | [SkillsFormulas](./bitburner.skillsformulas.md) | |
|
| [skills](./bitburner.formulas.skills.md) | [SkillsFormulas](./bitburner.skillsformulas.md) | Skills formulas |
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## Formulas.skills property
|
## Formulas.skills property
|
||||||
|
|
||||||
|
Skills formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## GangFormulas.calculateMoneyGain() method
|
## GangFormulas.calculateMoneyGain() method
|
||||||
|
|
||||||
|
Calculate money gain per tick.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,11 +16,13 @@ calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStat
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Member info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Task info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
number
|
number
|
||||||
|
|
||||||
|
The calculated money gain.
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## GangFormulas.calculateRespectGain() method
|
## GangFormulas.calculateRespectGain() method
|
||||||
|
|
||||||
|
Calculate respect gain per tick.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,11 +16,13 @@ calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskSt
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Gang info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Gang info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
number
|
number
|
||||||
|
|
||||||
|
The calculated respect gain.
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## GangFormulas.calculateWantedLevelGain() method
|
## GangFormulas.calculateWantedLevelGain() method
|
||||||
|
|
||||||
|
Calculate wanted gain per tick.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,11 +16,13 @@ calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTa
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Member info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Task info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
number
|
number
|
||||||
|
|
||||||
|
The calculated wanted gain.
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## GangFormulas.calculateWantedPenalty() method
|
## GangFormulas.calculateWantedPenalty() method
|
||||||
|
|
||||||
|
Calculate the wanted penalty.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,9 +16,11 @@ calculateWantedPenalty(gang: GangGenInfo): number;
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
number
|
number
|
||||||
|
|
||||||
|
The calculated wanted penalty.
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
## GangFormulas interface
|
## GangFormulas interface
|
||||||
|
|
||||||
|
Gang formulas
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
@ -15,8 +16,8 @@ interface GangFormulas
|
|||||||
|
|
||||||
| Method | Description |
|
| Method | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [calculateMoneyGain(gang, member, task)](./bitburner.gangformulas.calculatemoneygain.md) | |
|
| [calculateMoneyGain(gang, member, task)](./bitburner.gangformulas.calculatemoneygain.md) | Calculate money gain per tick. |
|
||||||
| [calculateRespectGain(gang, member, task)](./bitburner.gangformulas.calculaterespectgain.md) | |
|
| [calculateRespectGain(gang, member, task)](./bitburner.gangformulas.calculaterespectgain.md) | Calculate respect gain per tick. |
|
||||||
| [calculateWantedLevelGain(gang, member, task)](./bitburner.gangformulas.calculatewantedlevelgain.md) | |
|
| [calculateWantedLevelGain(gang, member, task)](./bitburner.gangformulas.calculatewantedlevelgain.md) | Calculate wanted gain per tick. |
|
||||||
| [calculateWantedPenalty(gang)](./bitburner.gangformulas.calculatewantedpenalty.md) | |
|
| [calculateWantedPenalty(gang)](./bitburner.gangformulas.calculatewantedpenalty.md) | Calculate the wanted penalty. |
|
||||||
|
|
||||||
|
@ -26,10 +26,10 @@
|
|||||||
| [Employee](./bitburner.employee.md) | |
|
| [Employee](./bitburner.employee.md) | |
|
||||||
| [EmployeeJobs](./bitburner.employeejobs.md) | |
|
| [EmployeeJobs](./bitburner.employeejobs.md) | |
|
||||||
| [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. |
|
| [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. |
|
||||||
| [Formulas](./bitburner.formulas.md) | |
|
| [Formulas](./bitburner.formulas.md) | Formulas API |
|
||||||
| [Fragment](./bitburner.fragment.md) | |
|
| [Fragment](./bitburner.fragment.md) | |
|
||||||
| [Gang](./bitburner.gang.md) | Gang API |
|
| [Gang](./bitburner.gang.md) | Gang API |
|
||||||
| [GangFormulas](./bitburner.gangformulas.md) | |
|
| [GangFormulas](./bitburner.gangformulas.md) | Gang formulas |
|
||||||
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
|
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
|
||||||
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
|
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
|
||||||
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||||
|
@ -9,7 +9,7 @@ Arguments passed into the script.
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
readonly args: (string | number)[];
|
readonly args: (string | number | boolean)[];
|
||||||
```
|
```
|
||||||
|
|
||||||
## Remarks
|
## Remarks
|
||||||
|
@ -17,7 +17,7 @@ export interface NS extends Singularity
|
|||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [args](./bitburner.ns.args.md) | (string \| number)\[\] | Arguments passed into the script. |
|
| [args](./bitburner.ns.args.md) | (string \| number \| boolean)\[\] | Arguments passed into the script. |
|
||||||
| [bladeburner](./bitburner.ns.bladeburner.md) | [Bladeburner](./bitburner.bladeburner.md) | Namespace for bladeburner functions. |
|
| [bladeburner](./bitburner.ns.bladeburner.md) | [Bladeburner](./bitburner.bladeburner.md) | Namespace for bladeburner functions. |
|
||||||
| [codingcontract](./bitburner.ns.codingcontract.md) | [CodingContract](./bitburner.codingcontract.md) | Namespace for codingcontract functions. |
|
| [codingcontract](./bitburner.ns.codingcontract.md) | [CodingContract](./bitburner.codingcontract.md) | Namespace for codingcontract functions. |
|
||||||
| [corporation](./bitburner.ns.corporation.md) | [Corporation](./bitburner.corporation.md) | Namespace for corporation functions. RAM cost: 0 GB |
|
| [corporation](./bitburner.ns.corporation.md) | [Corporation](./bitburner.corporation.md) | Namespace for corporation functions. RAM cost: 0 GB |
|
||||||
|
@ -20,7 +20,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox";
|
|||||||
import { InvitationEvent } from "./ui/InvitationModal";
|
import { InvitationEvent } from "./ui/InvitationModal";
|
||||||
|
|
||||||
export function inviteToFaction(faction: Faction): void {
|
export function inviteToFaction(faction: Faction): void {
|
||||||
Player.factionInvitations.push(faction.name);
|
Player.receiveInvite(faction.name);
|
||||||
faction.alreadyInvited = true;
|
faction.alreadyInvited = true;
|
||||||
if (!Settings.SuppressFactionInvites) {
|
if (!Settings.SuppressFactionInvites) {
|
||||||
InvitationEvent.emit(faction);
|
InvitationEvent.emit(faction);
|
||||||
|
@ -185,16 +185,16 @@ export function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, h
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
gang: {
|
gang: {
|
||||||
calculateWantedPenalty(gang: any): number {
|
wantedPenalty(gang: any): number {
|
||||||
return calculateWantedPenalty(gang);
|
return calculateWantedPenalty(gang);
|
||||||
},
|
},
|
||||||
calculateRespectGain: function (gang: any, member: any, task: any): number {
|
respectGain: function (gang: any, member: any, task: any): number {
|
||||||
return calculateRespectGain(gang, member, task);
|
return calculateRespectGain(gang, member, task);
|
||||||
},
|
},
|
||||||
calculateWantedLevelGain: function (gang: any, member: any, task: any): number {
|
wantedLevelGain: function (gang: any, member: any, task: any): number {
|
||||||
return calculateWantedLevelGain(gang, member, task);
|
return calculateWantedLevelGain(gang, member, task);
|
||||||
},
|
},
|
||||||
calculateMoneyGain: function (gang: any, member: any, task: any): number {
|
moneyGain: function (gang: any, member: any, task: any): number {
|
||||||
return calculateMoneyGain(gang, member, task);
|
return calculateMoneyGain(gang, member, task);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -201,6 +201,8 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
|
|||||||
mult: {
|
mult: {
|
||||||
agility: sl.agility_mult,
|
agility: sl.agility_mult,
|
||||||
agilityExp: sl.agility_exp_mult,
|
agilityExp: sl.agility_exp_mult,
|
||||||
|
charisma: sl.charisma_mult,
|
||||||
|
charismaExp: sl.charisma_exp_mult,
|
||||||
companyRep: sl.company_rep_mult,
|
companyRep: sl.company_rep_mult,
|
||||||
crimeMoney: sl.crime_money_mult,
|
crimeMoney: sl.crime_money_mult,
|
||||||
crimeSuccess: sl.crime_success_mult,
|
crimeSuccess: sl.crime_success_mult,
|
||||||
|
@ -30,6 +30,7 @@ export function CovenantSleeveMemoryUpgrade(props: IProps): React.ReactElement {
|
|||||||
let n: number = parseInt(e.target.value);
|
let n: number = parseInt(e.target.value);
|
||||||
|
|
||||||
if (isNaN(n)) n = 1;
|
if (isNaN(n)) n = 1;
|
||||||
|
if (n < 1) n = 1;
|
||||||
const maxMemory = 100 - props.sleeve.memory;
|
const maxMemory = 100 - props.sleeve.memory;
|
||||||
if (n > maxMemory) n = maxMemory;
|
if (n > maxMemory) n = maxMemory;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class BitburnerSaveObject {
|
|||||||
// Save file name is based on current timestamp and BitNode
|
// Save file name is based on current timestamp and BitNode
|
||||||
const epochTime = Math.round(Date.now() / 1000);
|
const epochTime = Math.round(Date.now() / 1000);
|
||||||
const bn = Player.bitNodeN;
|
const bn = Player.bitNodeN;
|
||||||
const filename = `bitburnerSave_BN${bn}x${SourceFileFlags[bn]}_${epochTime}.json`;
|
const filename = `bitburnerSave_${epochTime}_BN${bn}x${SourceFileFlags[bn]}.json`;
|
||||||
download(filename, saveString);
|
download(filename, saveString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
46
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
46
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -3341,6 +3341,7 @@ interface HacknetNodesFormulas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Hacknet Server formulas
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
interface HacknetServersFormulas {
|
interface HacknetServersFormulas {
|
||||||
@ -3355,23 +3356,58 @@ interface HacknetServersFormulas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gang formulas
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
interface GangFormulas {
|
interface GangFormulas {
|
||||||
calculateWantedPenalty(gang: GangGenInfo): number;
|
/**
|
||||||
calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
* Calculate the wanted penalty.
|
||||||
calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
* @returns The calculated wanted penalty.
|
||||||
|
*/
|
||||||
|
wantedPenalty(gang: GangGenInfo): number;
|
||||||
|
/**
|
||||||
|
* Calculate respect gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated respect gain.
|
||||||
|
*/
|
||||||
|
respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
|
/**
|
||||||
|
* Calculate wanted gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated wanted gain.
|
||||||
|
*/
|
||||||
|
wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
|
/**
|
||||||
|
* Calculate money gain per tick.
|
||||||
|
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||||
|
* @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}
|
||||||
|
* @param task - Task info from {@link Gang.getTaskStats | getTaskStats}
|
||||||
|
* @returns The calculated money gain.
|
||||||
|
*/
|
||||||
|
moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Formulas API
|
||||||
|
* @remarks
|
||||||
|
* You need Formulas.exe on your home computer to use this API.
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export interface Formulas {
|
export interface Formulas {
|
||||||
|
/** Skills formulas */
|
||||||
skills: SkillsFormulas;
|
skills: SkillsFormulas;
|
||||||
|
/** Hacking formulas */
|
||||||
hacking: HackingFormulas;
|
hacking: HackingFormulas;
|
||||||
|
/** Hacknet Nodes formulas */
|
||||||
hacknetNodes: HacknetNodesFormulas;
|
hacknetNodes: HacknetNodesFormulas;
|
||||||
|
/** Hacknet Servers formulas */
|
||||||
hacknetServers: HacknetServersFormulas;
|
hacknetServers: HacknetServersFormulas;
|
||||||
|
/** Gang formulas */
|
||||||
gang: GangFormulas;
|
gang: GangFormulas;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3571,7 +3607,7 @@ export interface NS extends Singularity {
|
|||||||
* It is also possible to get the number of arguments that was passed into a script using: 'args.length'
|
* It is also possible to get the number of arguments that was passed into a script using: 'args.length'
|
||||||
* WARNING: Do not try to modify the args array. This will break the game.
|
* WARNING: Do not try to modify the args array. This will break the game.
|
||||||
*/
|
*/
|
||||||
readonly args: (string | number)[];
|
readonly args: (string | number | boolean)[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Steal a servers money.
|
* Steal a servers money.
|
||||||
|
Loading…
Reference in New Issue
Block a user