mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43: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
|
||||
*/
|
||||
export declare interface Formulas {
|
||||
/** Skills formulas */
|
||||
skills: SkillsFormulas;
|
||||
/** Hacking formulas */
|
||||
hacking: HackingFormulas;
|
||||
/** Hacknet Nodes formulas */
|
||||
hacknetNodes: HacknetNodesFormulas;
|
||||
/** Hacknet Servers formulas */
|
||||
hacknetServers: HacknetServersFormulas;
|
||||
/** Gang formulas */
|
||||
gang: GangFormulas;
|
||||
}
|
||||
|
||||
@ -1253,12 +1261,39 @@ export declare interface Gang {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gang formulas
|
||||
* @public
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
@ -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'
|
||||
* 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.
|
||||
|
@ -7409,7 +7409,7 @@
|
||||
{
|
||||
"kind": "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": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -7422,7 +7422,7 @@
|
||||
{
|
||||
"kind": "PropertySignature",
|
||||
"canonicalReference": "bitburner!Formulas#gang:member",
|
||||
"docComment": "",
|
||||
"docComment": "/**\n * Gang formulas\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -7449,7 +7449,7 @@
|
||||
{
|
||||
"kind": "PropertySignature",
|
||||
"canonicalReference": "bitburner!Formulas#hacking:member",
|
||||
"docComment": "",
|
||||
"docComment": "/**\n * Hacking formulas\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -7476,7 +7476,7 @@
|
||||
{
|
||||
"kind": "PropertySignature",
|
||||
"canonicalReference": "bitburner!Formulas#hacknetNodes:member",
|
||||
"docComment": "",
|
||||
"docComment": "/**\n * Hacknet Nodes formulas\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -7503,7 +7503,7 @@
|
||||
{
|
||||
"kind": "PropertySignature",
|
||||
"canonicalReference": "bitburner!Formulas#hacknetServers:member",
|
||||
"docComment": "",
|
||||
"docComment": "/**\n * Hacknet Servers formulas\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -7530,7 +7530,7 @@
|
||||
{
|
||||
"kind": "PropertySignature",
|
||||
"canonicalReference": "bitburner!Formulas#skills:member",
|
||||
"docComment": "",
|
||||
"docComment": "/**\n * Skills formulas\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -8563,7 +8563,7 @@
|
||||
{
|
||||
"kind": "Interface",
|
||||
"canonicalReference": "bitburner!GangFormulas:interface",
|
||||
"docComment": "/**\n * @public\n */\n",
|
||||
"docComment": "/**\n * Gang formulas\n *\n * @public\n */\n",
|
||||
"excerptTokens": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -8576,7 +8576,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"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": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -8653,7 +8653,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"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": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -8730,7 +8730,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"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": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -8807,7 +8807,7 @@
|
||||
{
|
||||
"kind": "MethodSignature",
|
||||
"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": [
|
||||
{
|
||||
"kind": "Content",
|
||||
@ -14193,7 +14193,7 @@
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "(string | number)[]"
|
||||
"text": "(string | number | boolean)[]"
|
||||
},
|
||||
{
|
||||
"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
|
||||
|
||||
Gang formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Formulas.hacking property
|
||||
|
||||
Hacking formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Formulas.hacknetNodes property
|
||||
|
||||
Hacknet Nodes formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Formulas.hacknetServers property
|
||||
|
||||
Hacknet Servers formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## Formulas interface
|
||||
|
||||
Formulas API
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -11,13 +12,17 @@
|
||||
export interface Formulas
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
You need Formulas.exe on your home computer to use this API.
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [gang](./bitburner.formulas.gang.md) | [GangFormulas](./bitburner.gangformulas.md) | |
|
||||
| [hacking](./bitburner.formulas.hacking.md) | [HackingFormulas](./bitburner.hackingformulas.md) | |
|
||||
| [hacknetNodes](./bitburner.formulas.hacknetnodes.md) | [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | |
|
||||
| [hacknetServers](./bitburner.formulas.hacknetservers.md) | [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | |
|
||||
| [skills](./bitburner.formulas.skills.md) | [SkillsFormulas](./bitburner.skillsformulas.md) | |
|
||||
| [gang](./bitburner.formulas.gang.md) | [GangFormulas](./bitburner.gangformulas.md) | Gang formulas |
|
||||
| [hacking](./bitburner.formulas.hacking.md) | [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
|
||||
| [hacknetNodes](./bitburner.formulas.hacknetnodes.md) | [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | Hacknet Nodes formulas |
|
||||
| [hacknetServers](./bitburner.formulas.hacknetservers.md) | [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Servers formulas |
|
||||
| [skills](./bitburner.formulas.skills.md) | [SkillsFormulas](./bitburner.skillsformulas.md) | Skills formulas |
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Formulas.skills property
|
||||
|
||||
Skills formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## GangFormulas.calculateMoneyGain() method
|
||||
|
||||
Calculate money gain per tick.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -14,11 +16,13 @@ calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStat
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Member info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Task info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated money gain.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## GangFormulas.calculateRespectGain() method
|
||||
|
||||
Calculate respect gain per tick.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -14,11 +16,13 @@ calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskSt
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Gang info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Gang info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated respect gain.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## GangFormulas.calculateWantedLevelGain() method
|
||||
|
||||
Calculate wanted gain per tick.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -14,11 +16,13 @@ calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTa
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||
| member | [GangMemberInfo](./bitburner.gangmemberinfo.md) | Member info from [getMemberInformation](./bitburner.gang.getmemberinformation.md) |
|
||||
| task | [GangTaskStats](./bitburner.gangtaskstats.md) | Task info from [getTaskStats](./bitburner.gang.gettaskstats.md) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated wanted gain.
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## GangFormulas.calculateWantedPenalty() method
|
||||
|
||||
Calculate the wanted penalty.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -14,9 +16,11 @@ calculateWantedPenalty(gang: GangGenInfo): number;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | |
|
||||
| gang | [GangGenInfo](./bitburner.ganggeninfo.md) | Gang info from [getGangInformation](./bitburner.gang.getganginformation.md) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
||||
The calculated wanted penalty.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## GangFormulas interface
|
||||
|
||||
Gang formulas
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
@ -15,8 +16,8 @@ interface GangFormulas
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [calculateMoneyGain(gang, member, task)](./bitburner.gangformulas.calculatemoneygain.md) | |
|
||||
| [calculateRespectGain(gang, member, task)](./bitburner.gangformulas.calculaterespectgain.md) | |
|
||||
| [calculateWantedLevelGain(gang, member, task)](./bitburner.gangformulas.calculatewantedlevelgain.md) | |
|
||||
| [calculateWantedPenalty(gang)](./bitburner.gangformulas.calculatewantedpenalty.md) | |
|
||||
| [calculateMoneyGain(gang, member, task)](./bitburner.gangformulas.calculatemoneygain.md) | Calculate money gain per tick. |
|
||||
| [calculateRespectGain(gang, member, task)](./bitburner.gangformulas.calculaterespectgain.md) | Calculate respect gain per tick. |
|
||||
| [calculateWantedLevelGain(gang, member, task)](./bitburner.gangformulas.calculatewantedlevelgain.md) | Calculate wanted gain per tick. |
|
||||
| [calculateWantedPenalty(gang)](./bitburner.gangformulas.calculatewantedpenalty.md) | Calculate the wanted penalty. |
|
||||
|
||||
|
@ -26,10 +26,10 @@
|
||||
| [Employee](./bitburner.employee.md) | |
|
||||
| [EmployeeJobs](./bitburner.employeejobs.md) | |
|
||||
| [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) | |
|
||||
| [Gang](./bitburner.gang.md) | Gang API |
|
||||
| [GangFormulas](./bitburner.gangformulas.md) | |
|
||||
| [GangFormulas](./bitburner.gangformulas.md) | Gang formulas |
|
||||
| [GangGenInfo](./bitburner.ganggeninfo.md) | Gang general info. |
|
||||
| [GangMemberAscension](./bitburner.gangmemberascension.md) | |
|
||||
| [GangMemberInfo](./bitburner.gangmemberinfo.md) | |
|
||||
|
@ -9,7 +9,7 @@ Arguments passed into the script.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
readonly args: (string | number)[];
|
||||
readonly args: (string | number | boolean)[];
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
@ -17,7 +17,7 @@ export interface NS extends Singularity
|
||||
|
||||
| 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. |
|
||||
| [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 |
|
||||
|
@ -20,7 +20,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { InvitationEvent } from "./ui/InvitationModal";
|
||||
|
||||
export function inviteToFaction(faction: Faction): void {
|
||||
Player.factionInvitations.push(faction.name);
|
||||
Player.receiveInvite(faction.name);
|
||||
faction.alreadyInvited = true;
|
||||
if (!Settings.SuppressFactionInvites) {
|
||||
InvitationEvent.emit(faction);
|
||||
|
@ -185,16 +185,16 @@ export function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, h
|
||||
},
|
||||
},
|
||||
gang: {
|
||||
calculateWantedPenalty(gang: any): number {
|
||||
wantedPenalty(gang: any): number {
|
||||
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);
|
||||
},
|
||||
calculateWantedLevelGain: function (gang: any, member: any, task: any): number {
|
||||
wantedLevelGain: function (gang: any, member: any, task: any): number {
|
||||
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);
|
||||
},
|
||||
},
|
||||
|
@ -201,6 +201,8 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
|
||||
mult: {
|
||||
agility: sl.agility_mult,
|
||||
agilityExp: sl.agility_exp_mult,
|
||||
charisma: sl.charisma_mult,
|
||||
charismaExp: sl.charisma_exp_mult,
|
||||
companyRep: sl.company_rep_mult,
|
||||
crimeMoney: sl.crime_money_mult,
|
||||
crimeSuccess: sl.crime_success_mult,
|
||||
|
@ -30,6 +30,7 @@ export function CovenantSleeveMemoryUpgrade(props: IProps): React.ReactElement {
|
||||
let n: number = parseInt(e.target.value);
|
||||
|
||||
if (isNaN(n)) n = 1;
|
||||
if (n < 1) n = 1;
|
||||
const maxMemory = 100 - props.sleeve.memory;
|
||||
if (n > maxMemory) n = maxMemory;
|
||||
|
||||
|
@ -77,7 +77,7 @@ class BitburnerSaveObject {
|
||||
// Save file name is based on current timestamp and BitNode
|
||||
const epochTime = Math.round(Date.now() / 1000);
|
||||
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);
|
||||
}
|
||||
|
||||
|
46
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
46
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -3341,6 +3341,7 @@ interface HacknetNodesFormulas {
|
||||
}
|
||||
|
||||
/**
|
||||
* Hacknet Server formulas
|
||||
* @public
|
||||
*/
|
||||
interface HacknetServersFormulas {
|
||||
@ -3355,23 +3356,58 @@ interface HacknetServersFormulas {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gang formulas
|
||||
* @public
|
||||
*/
|
||||
interface GangFormulas {
|
||||
calculateWantedPenalty(gang: GangGenInfo): number;
|
||||
calculateRespectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
calculateWantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
calculateMoneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;
|
||||
/**
|
||||
* Calculate the wanted penalty.
|
||||
* @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}
|
||||
* @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
|
||||
*/
|
||||
export interface Formulas {
|
||||
/** Skills formulas */
|
||||
skills: SkillsFormulas;
|
||||
/** Hacking formulas */
|
||||
hacking: HackingFormulas;
|
||||
/** Hacknet Nodes formulas */
|
||||
hacknetNodes: HacknetNodesFormulas;
|
||||
/** Hacknet Servers formulas */
|
||||
hacknetServers: HacknetServersFormulas;
|
||||
/** Gang formulas */
|
||||
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'
|
||||
* 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.
|
||||
|
Loading…
Reference in New Issue
Block a user