mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 04:05:46 +01:00
allbuild commit de644247
This commit is contained in:
parent
de64424740
commit
8159dad5fa
209
dist/bitburner.d.ts
vendored
209
dist/bitburner.d.ts
vendored
@ -136,7 +136,7 @@ export declare interface BitNodeMultipliers {
|
||||
/** Influences how much money the player earns when completing working their job. */
|
||||
CompanyWorkMoney: number;
|
||||
/** Influences the money gain from dividends of corporations created by the player. */
|
||||
CorporationSoftCap: number;
|
||||
CorporationSoftcap: number;
|
||||
/** Influences the valuation of corporations created by the player. */
|
||||
CorporationValuation: number;
|
||||
/** Influences the base experience gained for each ability when the player commits a crime. */
|
||||
@ -813,7 +813,7 @@ export declare interface CodingContract {
|
||||
* Attempts to solve the Coding Contract with the provided solution.
|
||||
*
|
||||
* @param answer - Solution for the contract.
|
||||
* @param fn - Filename of the contract.
|
||||
* @param filename - Filename of the contract.
|
||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||
* @param opts - Optional parameters for configuring function behavior.
|
||||
* @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.
|
||||
@ -828,7 +828,7 @@ export declare interface CodingContract {
|
||||
* Returns a name describing the type of problem posed by the Coding Contract.
|
||||
* (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)
|
||||
*
|
||||
* @param fn - Filename of the contract.
|
||||
* @param filename - Filename of the contract.
|
||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||
* @returns Name describing the type of problem posed by the Coding Contract.
|
||||
*/
|
||||
@ -841,7 +841,7 @@ export declare interface CodingContract {
|
||||
*
|
||||
* Get the full text description for the problem posed by the Coding Contract.
|
||||
*
|
||||
* @param fn - Filename of the contract.
|
||||
* @param filename - Filename of the contract.
|
||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||
* @returns Contract’s text description.
|
||||
*/
|
||||
@ -869,7 +869,7 @@ export declare interface CodingContract {
|
||||
*
|
||||
* Get the number of tries remaining on the contract before it self-destructs.
|
||||
*
|
||||
* @param fn - Filename of the contract.
|
||||
* @param filename - Filename of the contract.
|
||||
* @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.
|
||||
* @returns How many attempts are remaining for the contract;
|
||||
*/
|
||||
@ -1120,6 +1120,8 @@ export declare interface Division {
|
||||
cities: string[];
|
||||
/** Products developed by this division */
|
||||
products: string[];
|
||||
/** Whether the industry this division is in is capable of making products */
|
||||
makesProducts: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1129,22 +1131,27 @@ export declare interface Division {
|
||||
export declare interface Employee {
|
||||
/** Name of the employee */
|
||||
name: string;
|
||||
/** Morale */
|
||||
/** Morale of the employee */
|
||||
mor: number;
|
||||
/** Happiness */
|
||||
/** Happiness of the employee */
|
||||
hap: number;
|
||||
/** Energy */
|
||||
/** Energy of the employee */
|
||||
ene: number;
|
||||
/** Intelligence of the employee */
|
||||
int: number;
|
||||
/** Charisma of the employee */
|
||||
cha: number;
|
||||
/** Experience of the employee */
|
||||
exp: number;
|
||||
/** Creativity of the employee */
|
||||
cre: number;
|
||||
/** Efficiency of the employee */
|
||||
eff: number;
|
||||
/** Salary */
|
||||
/** Salary of the employee */
|
||||
sal: number;
|
||||
/** City */
|
||||
/** Current Location (city) */
|
||||
loc: string;
|
||||
/** Current job */
|
||||
/** Current job position */
|
||||
pos: string;
|
||||
}
|
||||
|
||||
@ -2439,6 +2446,47 @@ export declare interface HacknetServersFormulas {
|
||||
constants(): HacknetServerConstants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Infiltration API.
|
||||
* @public
|
||||
*/
|
||||
export declare interface Infiltration {
|
||||
/**
|
||||
* Get all locations that can be infiltrated.
|
||||
* @remarks
|
||||
* RAM cost: 5 GB
|
||||
*
|
||||
* @returns all locations that can be infiltrated.
|
||||
*/
|
||||
getPossibleLocations(): string[];
|
||||
/**
|
||||
* Get all infiltrations with difficulty, location and rewards.
|
||||
* @remarks
|
||||
* RAM cost: 15 GB
|
||||
*
|
||||
* @returns Infiltration data for given location.
|
||||
*/
|
||||
getInfiltration(location: string): InfiltrationLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export declare interface InfiltrationLocation {
|
||||
location: any;
|
||||
reward: InfiltrationReward;
|
||||
difficulty: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export declare interface InfiltrationReward {
|
||||
tradeRep: number;
|
||||
sellCash: number;
|
||||
SoARep: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Corporation investment offer
|
||||
* @public
|
||||
@ -2478,8 +2526,12 @@ export declare interface Material {
|
||||
cmp: number | undefined;
|
||||
/** Amount of material produced */
|
||||
prod: number;
|
||||
/** Amount of material sold */
|
||||
/** Amount of material sold */
|
||||
sell: number;
|
||||
/** cost to buy material */
|
||||
cost: number;
|
||||
/** Sell cost, can be "MP+5" */
|
||||
sCost: string | number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2657,6 +2709,11 @@ export declare interface NS {
|
||||
* RAM cost: 0 GB
|
||||
*/
|
||||
readonly stanek: Stanek;
|
||||
/**
|
||||
* Namespace for infiltration functions.
|
||||
* RAM cost: 0 GB
|
||||
*/
|
||||
readonly infiltration: Infiltration;
|
||||
/**
|
||||
* Namespace for corporation functions.
|
||||
* RAM cost: 0 GB
|
||||
@ -2959,6 +3016,7 @@ export declare interface NS {
|
||||
|
||||
/**
|
||||
* Suspends the script for n milliseconds. Doesn't block with concurrent calls.
|
||||
* You should prefer 'sleep' over 'asleep' except when doing very complex UI work.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
@ -3157,6 +3215,21 @@ export declare interface NS {
|
||||
*/
|
||||
tail(fn?: FilenameOrPID, host?: string, ...args: any[]): void;
|
||||
|
||||
/**
|
||||
* Close the tail window of a script.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
* Closes a script’s logs. This is functionally the same pressing the "Close" button on the tail window.
|
||||
*
|
||||
* If the function is called with no arguments, it will close the current script’s logs.
|
||||
*
|
||||
* Otherwise, the pid argument can be used to close the logs from another script.
|
||||
*
|
||||
* @param pid - Optional. PID of the script having its tail closed. If omitted, the current script is used.
|
||||
*/
|
||||
closeTail(pid?: number): void;
|
||||
|
||||
/**
|
||||
* Get the list of servers connected to a server.
|
||||
* @remarks
|
||||
@ -3361,8 +3434,7 @@ export declare interface NS {
|
||||
* PID stands for Process ID. The PID is a unique identifier for each script.
|
||||
* The PID will always be a positive integer.
|
||||
*
|
||||
* Running this function with a numThreads argument of 0 will return 0 without running the script.
|
||||
* However, running this function with a negative numThreads argument will cause a runtime error.
|
||||
* Running this function with 0 or a negative numThreads argument will cause a runtime error.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
@ -3507,9 +3579,10 @@ export declare interface NS {
|
||||
* If no host is defined, it will kill all scripts, where the script is running.
|
||||
*
|
||||
* @param host - IP or hostname of the server on which to kill all scripts.
|
||||
* @param safetyguard - Skips the script that calls this function
|
||||
* @returns True if any scripts were killed, and false otherwise.
|
||||
*/
|
||||
killall(host?: string): boolean;
|
||||
killall(host?: string, safetyguard?: boolean): boolean;
|
||||
|
||||
/**
|
||||
* Terminates the current script immediately.
|
||||
@ -4322,7 +4395,7 @@ export declare interface NS {
|
||||
* Returns 0 if the script does not exist.
|
||||
*
|
||||
* @param script - Filename of script. This is case-sensitive.
|
||||
* @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.
|
||||
* @param host - Host of target server the script is located on. This is optional, if it is not specified then the function will use the current server as the target server.
|
||||
* @returns Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist.
|
||||
*/
|
||||
getScriptRam(script: string, host?: string): number;
|
||||
@ -5066,6 +5139,13 @@ export declare interface ReputationFormulas {
|
||||
* @returns The calculated faction favor.
|
||||
*/
|
||||
calculateRepToFavor(rep: number): number;
|
||||
|
||||
/**
|
||||
* Calculate how much rep would be gained.
|
||||
* @param amount - Amount of money donated
|
||||
* @param player - Player info from {@link NS.getPlayer | getPlayer}
|
||||
*/
|
||||
repFromDonation(amount: number, player: Player): number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5432,6 +5512,18 @@ export declare interface Singularity {
|
||||
*/
|
||||
workForCompany(companyName?: string, focus?: boolean): boolean;
|
||||
|
||||
/**
|
||||
* Quit jobs by company.
|
||||
* @remarks
|
||||
* RAM cost: 3 GB * 16/4/1
|
||||
*
|
||||
*
|
||||
* This function will finish work with the company provided and quit any jobs.
|
||||
*
|
||||
* @param companyName - Name of the company.
|
||||
*/
|
||||
quitJob(companyName?: string): void;
|
||||
|
||||
/**
|
||||
* Apply for a job at a company.
|
||||
* @remarks
|
||||
@ -5830,7 +5922,7 @@ export declare interface Singularity {
|
||||
* RAM cost: 5 GB * 16/4/1
|
||||
*
|
||||
*
|
||||
* This function will automatically install your Augmentations, resetting the game as usual.
|
||||
* This function will automatically install your Augmentations, resetting the game as usual. If you do not own uninstalled Augmentations then the game will not reset.
|
||||
*
|
||||
* @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.
|
||||
*/
|
||||
@ -5972,13 +6064,13 @@ export declare interface Singularity {
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS1
|
||||
* getDarkwebProgramsAvailable();
|
||||
* getDarkwebPrograms();
|
||||
* // returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
* ```
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS2
|
||||
* ns.getDarkwebProgramsAvailable();
|
||||
* ns.getDarkwebPrograms();
|
||||
* // returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
* ```
|
||||
* @returns - a list of programs available for purchase on the dark web, or [] if Tor has not
|
||||
@ -6018,6 +6110,30 @@ export declare interface Singularity {
|
||||
* purchased. Throws an error if the specified program/exploit does not exist
|
||||
*/
|
||||
getDarkwebProgramCost(programName: string): number;
|
||||
|
||||
/**
|
||||
* b1t_flum3 into a different BN.
|
||||
* @remarks
|
||||
* RAM cost: 16 GB * 16/4/1
|
||||
*
|
||||
* @param nextBN - BN number to jump to
|
||||
* @param callbackScript - Name of the script to launch in the next BN.
|
||||
*/
|
||||
b1tflum3(nextBN: number, callbackScript?: string): void;
|
||||
|
||||
/**
|
||||
* Destroy the w0r1d_d43m0n and move on to the next BN.
|
||||
* @remarks
|
||||
* RAM cost: 32 GB * 16/4/1
|
||||
*
|
||||
* You must have the special augment installed and the required hacking level
|
||||
* OR
|
||||
* Completed the final black op.
|
||||
*
|
||||
* @param nextBN - BN number to jump to
|
||||
* @param callbackScript - Name of the script to launch in the next BN.
|
||||
*/
|
||||
destroyW0r1dD43m0n(nextBN: number, callbackScript?: string): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6238,6 +6354,20 @@ export declare interface Sleeve {
|
||||
* @returns True if the aug was purchased and installed on the sleeve, false otherwise.
|
||||
*/
|
||||
purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;
|
||||
|
||||
/**
|
||||
* Set a sleeve to perform bladeburner actions.
|
||||
* @remarks
|
||||
* RAM cost: 4 GB
|
||||
*
|
||||
* Return a boolean indicating whether or not the sleeve started working out.
|
||||
*
|
||||
* @param sleeveNumber - Index of the sleeve to workout at the gym.
|
||||
* @param action - Name of the action to be performed.
|
||||
* @param contract - Name of the contract if applicable.
|
||||
* @returns True if the sleeve started working out, false otherwise.
|
||||
*/
|
||||
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6441,6 +6571,16 @@ export declare interface Stanek {
|
||||
* @returns The fragment at [rootX, rootY], if any.
|
||||
*/
|
||||
removeFragment(rootX: number, rootY: number): boolean;
|
||||
|
||||
/**
|
||||
* Accept Stanek's Gift by joining the Church of the Machine God
|
||||
* @remarks
|
||||
* RAM cost: 2 GB
|
||||
*
|
||||
* @returns true if the player is a member of the church and has the gift installed,
|
||||
* false otherwise.
|
||||
*/
|
||||
acceptGift(): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6927,6 +7067,13 @@ export declare interface UserInterface {
|
||||
* RAM cost: 0 GB
|
||||
*/
|
||||
getGameInfo(): GameInfo;
|
||||
|
||||
/**
|
||||
* Clear the Terminal window, as if the player ran `clear` in the terminal
|
||||
* @remarks
|
||||
* RAM cost: 0.2 GB
|
||||
*/
|
||||
clearTerminal(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -7152,8 +7299,9 @@ export declare interface WarehouseAPI {
|
||||
* Upgrade warehouse
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param amt - amount of upgrades defaults to 1
|
||||
*/
|
||||
upgradeWarehouse(divisionName: string, cityName: string): void;
|
||||
upgradeWarehouse(divisionName: string, cityName: string, amt?: number): void;
|
||||
/**
|
||||
* Create a new product
|
||||
* @param divisionName - Name of the division
|
||||
@ -7169,6 +7317,22 @@ export declare interface WarehouseAPI {
|
||||
designInvest: number,
|
||||
marketingInvest: number,
|
||||
): void;
|
||||
/**
|
||||
* Limit Material Production.
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param materialName - Name of the material
|
||||
* @param qty - Amount to limit to
|
||||
*/
|
||||
limitMaterialProduction(divisionName: string, cityName: string, materialName: string, qty: number): void;
|
||||
/**
|
||||
* Limit Product Production.
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param productName - Name of the product
|
||||
* @param qty - Amount to limit to
|
||||
*/
|
||||
limitProductProduction(divisionName: string, cityName: string, productName: string, qty: number): void;
|
||||
/**
|
||||
* Gets the cost to purchase a warehouse
|
||||
* @returns cost
|
||||
@ -7176,9 +7340,12 @@ export declare interface WarehouseAPI {
|
||||
getPurchaseWarehouseCost(): number;
|
||||
/**
|
||||
* Gets the cost to upgrade a warehouse to the next level
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param amt - amount of upgrades defaults to 1
|
||||
* @returns cost to upgrade
|
||||
*/
|
||||
getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;
|
||||
getUpgradeWarehouseCost(adivisionName: any, acityName: any, amt?: number): number;
|
||||
/**
|
||||
* Check if you have a warehouse in city
|
||||
* @returns true if warehouse is present, false if not
|
||||
|
4
dist/main.bundle.js
vendored
4
dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main.bundle.js.map
vendored
2
dist/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
40
dist/vendor.bundle.js
vendored
40
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/vendor.bundle.js.map
vendored
2
dist/vendor.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,13 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) > [CorporationSoftCap](./bitburner.bitnodemultipliers.corporationsoftcap.md)
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) > [CorporationSoftcap](./bitburner.bitnodemultipliers.corporationsoftcap.md)
|
||||
|
||||
## BitNodeMultipliers.CorporationSoftCap property
|
||||
## BitNodeMultipliers.CorporationSoftcap property
|
||||
|
||||
Influences the money gain from dividends of corporations created by the player.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
CorporationSoftCap: number;
|
||||
CorporationSoftcap: number;
|
||||
```
|
||||
|
@ -26,7 +26,7 @@ export interface BitNodeMultipliers
|
||||
| [CodingContractMoney](./bitburner.bitnodemultipliers.codingcontractmoney.md) | number | Influences the amount of money gained from completing Coding Contracts |
|
||||
| [CompanyWorkExpGain](./bitburner.bitnodemultipliers.companyworkexpgain.md) | number | Influences the experience gained for each ability when the player completes working their job. |
|
||||
| [CompanyWorkMoney](./bitburner.bitnodemultipliers.companyworkmoney.md) | number | Influences how much money the player earns when completing working their job. |
|
||||
| [CorporationSoftCap](./bitburner.bitnodemultipliers.corporationsoftcap.md) | number | Influences the money gain from dividends of corporations created by the player. |
|
||||
| [CorporationSoftcap](./bitburner.bitnodemultipliers.corporationsoftcap.md) | number | Influences the money gain from dividends of corporations created by the player. |
|
||||
| [CorporationValuation](./bitburner.bitnodemultipliers.corporationvaluation.md) | number | Influences the valuation of corporations created by the player. |
|
||||
| [CrimeExpGain](./bitburner.bitnodemultipliers.crimeexpgain.md) | number | Influences the base experience gained for each ability when the player commits a crime. |
|
||||
| [CrimeMoney](./bitburner.bitnodemultipliers.crimemoney.md) | number | Influences the base money gained when the player commits a crime. |
|
||||
|
@ -17,7 +17,7 @@ attempt(answer: string[] | number, filename: string, host?: string, opts?: Codin
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| answer | string\[\] \| number | Solution for the contract. |
|
||||
| filename | string | |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
| opts | [CodingAttemptOptions](./bitburner.codingattemptoptions.md) | Optional parameters for configuring function behavior. |
|
||||
|
||||
|
@ -16,7 +16,7 @@ getContractType(filename: string, host?: string): string;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filename | string | |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
@ -16,7 +16,7 @@ getDescription(filename: string, host?: string): string;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filename | string | |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
@ -16,7 +16,7 @@ getNumTriesRemaining(filename: string, host?: string): number;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filename | string | |
|
||||
| filename | string | Filename of the contract. |
|
||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
13
markdown/bitburner.division.makesproducts.md
Normal file
13
markdown/bitburner.division.makesproducts.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) > [Division](./bitburner.division.md) > [makesProducts](./bitburner.division.makesproducts.md)
|
||||
|
||||
## Division.makesProducts property
|
||||
|
||||
Whether the industry this division is in is capable of making products
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
makesProducts: boolean;
|
||||
```
|
@ -20,6 +20,7 @@ interface Division
|
||||
| [cities](./bitburner.division.cities.md) | string\[\] | Cities in which this division has expanded |
|
||||
| [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md) | number | Expenses last cycle |
|
||||
| [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md) | number | Revenue last cycle |
|
||||
| [makesProducts](./bitburner.division.makesproducts.md) | boolean | Whether the industry this division is in is capable of making products |
|
||||
| [name](./bitburner.division.name.md) | string | Name of the division |
|
||||
| [popularity](./bitburner.division.popularity.md) | number | Popularity of the division |
|
||||
| [prodMult](./bitburner.division.prodmult.md) | number | Production multiplier |
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Employee.cha property
|
||||
|
||||
Charisma of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Employee.cre property
|
||||
|
||||
Creativity of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Employee.eff property
|
||||
|
||||
Efficiency of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.ene property
|
||||
|
||||
Energy
|
||||
Energy of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Employee.exp property
|
||||
|
||||
Experience of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.hap property
|
||||
|
||||
Happiness
|
||||
Happiness of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Employee.int property
|
||||
|
||||
Intelligence of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.loc property
|
||||
|
||||
City
|
||||
Current Location (city)
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
@ -16,16 +16,16 @@ interface Employee
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [cha](./bitburner.employee.cha.md) | number | |
|
||||
| [cre](./bitburner.employee.cre.md) | number | |
|
||||
| [eff](./bitburner.employee.eff.md) | number | |
|
||||
| [ene](./bitburner.employee.ene.md) | number | Energy |
|
||||
| [exp](./bitburner.employee.exp.md) | number | |
|
||||
| [hap](./bitburner.employee.hap.md) | number | Happiness |
|
||||
| [int](./bitburner.employee.int.md) | number | |
|
||||
| [loc](./bitburner.employee.loc.md) | string | City |
|
||||
| [mor](./bitburner.employee.mor.md) | number | Morale |
|
||||
| [cha](./bitburner.employee.cha.md) | number | Charisma of the employee |
|
||||
| [cre](./bitburner.employee.cre.md) | number | Creativity of the employee |
|
||||
| [eff](./bitburner.employee.eff.md) | number | Efficiency of the employee |
|
||||
| [ene](./bitburner.employee.ene.md) | number | Energy of the employee |
|
||||
| [exp](./bitburner.employee.exp.md) | number | Experience of the employee |
|
||||
| [hap](./bitburner.employee.hap.md) | number | Happiness of the employee |
|
||||
| [int](./bitburner.employee.int.md) | number | Intelligence of the employee |
|
||||
| [loc](./bitburner.employee.loc.md) | string | Current Location (city) |
|
||||
| [mor](./bitburner.employee.mor.md) | number | Morale of the employee |
|
||||
| [name](./bitburner.employee.name.md) | string | Name of the employee |
|
||||
| [pos](./bitburner.employee.pos.md) | string | Current job |
|
||||
| [sal](./bitburner.employee.sal.md) | number | Salary |
|
||||
| [pos](./bitburner.employee.pos.md) | string | Current job position |
|
||||
| [sal](./bitburner.employee.sal.md) | number | Salary of the employee |
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.mor property
|
||||
|
||||
Morale
|
||||
Morale of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.pos property
|
||||
|
||||
Current job
|
||||
Current job position
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Employee.sal property
|
||||
|
||||
Salary
|
||||
Salary of the employee
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
30
markdown/bitburner.infiltration.getinfiltration.md
Normal file
30
markdown/bitburner.infiltration.getinfiltration.md
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Infiltration](./bitburner.infiltration.md) > [getInfiltration](./bitburner.infiltration.getinfiltration.md)
|
||||
|
||||
## Infiltration.getInfiltration() method
|
||||
|
||||
Get all infiltrations with difficulty, location and rewards.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getInfiltration(location: string): InfiltrationLocation;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| location | string | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
[InfiltrationLocation](./bitburner.infiltrationlocation.md)
|
||||
|
||||
Infiltration data for given location.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 15 GB
|
||||
|
23
markdown/bitburner.infiltration.getpossiblelocations.md
Normal file
23
markdown/bitburner.infiltration.getpossiblelocations.md
Normal file
@ -0,0 +1,23 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Infiltration](./bitburner.infiltration.md) > [getPossibleLocations](./bitburner.infiltration.getpossiblelocations.md)
|
||||
|
||||
## Infiltration.getPossibleLocations() method
|
||||
|
||||
Get all locations that can be infiltrated.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getPossibleLocations(): string[];
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
string\[\]
|
||||
|
||||
all locations that can be infiltrated.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 5 GB
|
||||
|
21
markdown/bitburner.infiltration.md
Normal file
21
markdown/bitburner.infiltration.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) > [Infiltration](./bitburner.infiltration.md)
|
||||
|
||||
## Infiltration interface
|
||||
|
||||
Infiltration API.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
interface Infiltration
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [getInfiltration(location)](./bitburner.infiltration.getinfiltration.md) | Get all infiltrations with difficulty, location and rewards. |
|
||||
| [getPossibleLocations()](./bitburner.infiltration.getpossiblelocations.md) | Get all locations that can be infiltrated. |
|
||||
|
11
markdown/bitburner.infiltrationlocation.difficulty.md
Normal file
11
markdown/bitburner.infiltrationlocation.difficulty.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [difficulty](./bitburner.infiltrationlocation.difficulty.md)
|
||||
|
||||
## InfiltrationLocation.difficulty property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
difficulty: number;
|
||||
```
|
11
markdown/bitburner.infiltrationlocation.location.md
Normal file
11
markdown/bitburner.infiltrationlocation.location.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [location](./bitburner.infiltrationlocation.location.md)
|
||||
|
||||
## InfiltrationLocation.location property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
location: any;
|
||||
```
|
21
markdown/bitburner.infiltrationlocation.md
Normal file
21
markdown/bitburner.infiltrationlocation.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) > [InfiltrationLocation](./bitburner.infiltrationlocation.md)
|
||||
|
||||
## InfiltrationLocation interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface InfiltrationLocation
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [difficulty](./bitburner.infiltrationlocation.difficulty.md) | number | |
|
||||
| [location](./bitburner.infiltrationlocation.location.md) | any | |
|
||||
| [reward](./bitburner.infiltrationlocation.reward.md) | [InfiltrationReward](./bitburner.infiltrationreward.md) | |
|
||||
|
11
markdown/bitburner.infiltrationlocation.reward.md
Normal file
11
markdown/bitburner.infiltrationlocation.reward.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationLocation](./bitburner.infiltrationlocation.md) > [reward](./bitburner.infiltrationlocation.reward.md)
|
||||
|
||||
## InfiltrationLocation.reward property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
reward: InfiltrationReward;
|
||||
```
|
21
markdown/bitburner.infiltrationreward.md
Normal file
21
markdown/bitburner.infiltrationreward.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) > [InfiltrationReward](./bitburner.infiltrationreward.md)
|
||||
|
||||
## InfiltrationReward interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface InfiltrationReward
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [sellCash](./bitburner.infiltrationreward.sellcash.md) | number | |
|
||||
| [SoARep](./bitburner.infiltrationreward.soarep.md) | number | |
|
||||
| [tradeRep](./bitburner.infiltrationreward.traderep.md) | number | |
|
||||
|
11
markdown/bitburner.infiltrationreward.sellcash.md
Normal file
11
markdown/bitburner.infiltrationreward.sellcash.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationReward](./bitburner.infiltrationreward.md) > [sellCash](./bitburner.infiltrationreward.sellcash.md)
|
||||
|
||||
## InfiltrationReward.sellCash property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
sellCash: number;
|
||||
```
|
11
markdown/bitburner.infiltrationreward.soarep.md
Normal file
11
markdown/bitburner.infiltrationreward.soarep.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationReward](./bitburner.infiltrationreward.md) > [SoARep](./bitburner.infiltrationreward.soarep.md)
|
||||
|
||||
## InfiltrationReward.SoARep property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
SoARep: number;
|
||||
```
|
11
markdown/bitburner.infiltrationreward.traderep.md
Normal file
11
markdown/bitburner.infiltrationreward.traderep.md
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [InfiltrationReward](./bitburner.infiltrationreward.md) > [tradeRep](./bitburner.infiltrationreward.traderep.md)
|
||||
|
||||
## InfiltrationReward.tradeRep property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
tradeRep: number;
|
||||
```
|
13
markdown/bitburner.material.cost.md
Normal file
13
markdown/bitburner.material.cost.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) > [Material](./bitburner.material.md) > [cost](./bitburner.material.cost.md)
|
||||
|
||||
## Material.cost property
|
||||
|
||||
cost to buy material
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
cost: number;
|
||||
```
|
@ -17,10 +17,12 @@ interface Material
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [cmp](./bitburner.material.cmp.md) | number \| undefined | Competition for the material, only present if "Market Research - Competition" unlocked |
|
||||
| [cost](./bitburner.material.cost.md) | number | cost to buy material |
|
||||
| [dmd](./bitburner.material.dmd.md) | number \| undefined | Demand for the material, only present if "Market Research - Demand" unlocked |
|
||||
| [name](./bitburner.material.name.md) | string | Name of the material |
|
||||
| [prod](./bitburner.material.prod.md) | number | Amount of material produced |
|
||||
| [qlt](./bitburner.material.qlt.md) | number | Quality of the material |
|
||||
| [qty](./bitburner.material.qty.md) | number | Amount of material |
|
||||
| [sCost](./bitburner.material.scost.md) | string \| number | Sell cost, can be "MP+5" |
|
||||
| [sell](./bitburner.material.sell.md) | number | Amount of material sold |
|
||||
|
||||
|
13
markdown/bitburner.material.scost.md
Normal file
13
markdown/bitburner.material.scost.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) > [Material](./bitburner.material.md) > [sCost](./bitburner.material.scost.md)
|
||||
|
||||
## Material.sCost property
|
||||
|
||||
Sell cost, can be "MP+5"
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
sCost: string | number;
|
||||
```
|
@ -55,6 +55,9 @@
|
||||
| [HacknetNodesFormulas](./bitburner.hacknetnodesformulas.md) | Hacknet Node formulas |
|
||||
| [HacknetServerConstants](./bitburner.hacknetserverconstants.md) | Hacknet server related constants |
|
||||
| [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Server formulas |
|
||||
| [Infiltration](./bitburner.infiltration.md) | Infiltration API. |
|
||||
| [InfiltrationLocation](./bitburner.infiltrationlocation.md) | |
|
||||
| [InfiltrationReward](./bitburner.infiltrationreward.md) | |
|
||||
| [InvestmentOffer](./bitburner.investmentoffer.md) | Corporation investment offer |
|
||||
| [Material](./bitburner.material.md) | Material in a warehouse |
|
||||
| [NetscriptPort](./bitburner.netscriptport.md) | Object representing a port. A port is a serialized queue. |
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## NS.asleep() method
|
||||
|
||||
Suspends the script for n milliseconds. Doesn't block with concurrent calls.
|
||||
Suspends the script for n milliseconds. Doesn't block with concurrent calls. You should prefer 'sleep' over 'asleep' except when doing very complex UI work.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
34
markdown/bitburner.ns.closetail.md
Normal file
34
markdown/bitburner.ns.closetail.md
Normal file
@ -0,0 +1,34 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [closeTail](./bitburner.ns.closetail.md)
|
||||
|
||||
## NS.closeTail() method
|
||||
|
||||
Close the tail window of a script.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
closeTail(pid?: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| pid | number | Optional. PID of the script having its tail closed. If omitted, the current script is used. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
Closes a script’s logs. This is functionally the same pressing the "Close" button on the tail window.
|
||||
|
||||
If the function is called with no arguments, it will close the current script’s logs.
|
||||
|
||||
Otherwise, the pid argument can be used to close the logs from another script.
|
||||
|
@ -37,7 +37,7 @@ If the script was successfully started, then this functions returns the PID of t
|
||||
|
||||
PID stands for Process ID. The PID is a unique identifier for each script. The PID will always be a positive integer.
|
||||
|
||||
Running this function with a numThreads argument of 0 will return 0 without running the script. However, running this function with a negative numThreads argument will cause a runtime error.
|
||||
Running this function with 0 or a negative numThreads argument will cause a runtime error.
|
||||
|
||||
## Example 1
|
||||
|
||||
|
@ -17,7 +17,7 @@ getScriptRam(script: string, host?: string): number;
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| script | string | Filename of script. This is case-sensitive. |
|
||||
| host | string | Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server. |
|
||||
| host | string | Host of target server the script is located on. This is optional, if it is not specified then the function will use the current server as the target server. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
13
markdown/bitburner.ns.infiltration.md
Normal file
13
markdown/bitburner.ns.infiltration.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) > [NS](./bitburner.ns.md) > [infiltration](./bitburner.ns.infiltration.md)
|
||||
|
||||
## NS.infiltration property
|
||||
|
||||
Namespace for infiltration functions. RAM cost: 0 GB
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
readonly infiltration: Infiltration;
|
||||
```
|
@ -9,7 +9,7 @@ Terminate all scripts on a server.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
killall(host?: string): boolean;
|
||||
killall(host?: string, safetyguard?: boolean): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -17,6 +17,7 @@ killall(host?: string): boolean;
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| host | string | IP or hostname of the server on which to kill all scripts. |
|
||||
| safetyguard | boolean | Skips the script that calls this function |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
@ -49,6 +49,7 @@ export async function main(ns) {
|
||||
| [gang](./bitburner.ns.gang.md) | [Gang](./bitburner.gang.md) | Namespace for gang functions. |
|
||||
| [grafting](./bitburner.ns.grafting.md) | [Grafting](./bitburner.grafting.md) | Namespace for grafting functions. |
|
||||
| [hacknet](./bitburner.ns.hacknet.md) | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. |
|
||||
| [infiltration](./bitburner.ns.infiltration.md) | [Infiltration](./bitburner.infiltration.md) | Namespace for infiltration functions. RAM cost: 0 GB |
|
||||
| [singularity](./bitburner.ns.singularity.md) | [Singularity](./bitburner.singularity.md) | Namespace for singularity functions. RAM cost: 0 GB |
|
||||
| [sleeve](./bitburner.ns.sleeve.md) | [Sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. |
|
||||
| [stanek](./bitburner.ns.stanek.md) | [Stanek](./bitburner.stanek.md) | Namespace for stanek functions. RAM cost: 0 GB |
|
||||
@ -60,12 +61,13 @@ export async function main(ns) {
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [alert(msg)](./bitburner.ns.alert.md) | Open up a message box. |
|
||||
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. |
|
||||
| [asleep(millis)](./bitburner.ns.asleep.md) | Suspends the script for n milliseconds. Doesn't block with concurrent calls. You should prefer 'sleep' over 'asleep' except when doing very complex UI work. |
|
||||
| [atExit(f)](./bitburner.ns.atexit.md) | Add callback function when the script dies |
|
||||
| [brutessh(host)](./bitburner.ns.brutessh.md) | Runs BruteSSH.exe on a server. |
|
||||
| [clear(handle)](./bitburner.ns.clear.md) | Clear data from a file. |
|
||||
| [clearLog()](./bitburner.ns.clearlog.md) | Clears the script’s logs. |
|
||||
| [clearPort(handle)](./bitburner.ns.clearport.md) | Clear data from a port. |
|
||||
| [closeTail(pid)](./bitburner.ns.closetail.md) | Close the tail window of a script. |
|
||||
| [deleteServer(host)](./bitburner.ns.deleteserver.md) | Delete a purchased server. |
|
||||
| [disableLog(fn)](./bitburner.ns.disablelog.md) | Disables logging for the given function. |
|
||||
| [enableLog(fn)](./bitburner.ns.enablelog.md) | Enable logging for a certain function. |
|
||||
@ -127,7 +129,7 @@ export async function main(ns) {
|
||||
| [isRunning(script, host, args)](./bitburner.ns.isrunning.md) | Check if a script is running. |
|
||||
| [kill(script)](./bitburner.ns.kill.md) | Terminate another script. |
|
||||
| [kill(script, host, args)](./bitburner.ns.kill_1.md) | Terminate another script. |
|
||||
| [killall(host)](./bitburner.ns.killall.md) | Terminate all scripts on a server. |
|
||||
| [killall(host, safetyguard)](./bitburner.ns.killall.md) | Terminate all scripts on a server. |
|
||||
| [ls(host, grep)](./bitburner.ns.ls.md) | List files on a server. |
|
||||
| [mv(host, source, destination)](./bitburner.ns.mv.md) | Move a file on the target server. |
|
||||
| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number |
|
||||
|
@ -18,4 +18,5 @@ interface ReputationFormulas
|
||||
| --- | --- |
|
||||
| [calculateFavorToRep(favor)](./bitburner.reputationformulas.calculatefavortorep.md) | Calculate the total required amount of faction reputation to reach a target favor. |
|
||||
| [calculateRepToFavor(rep)](./bitburner.reputationformulas.calculatereptofavor.md) | Calculate the resulting faction favor of a total amount of reputation. (Faction favor is gained whenever you install an Augmentation.) |
|
||||
| [repFromDonation(amount, player)](./bitburner.reputationformulas.repfromdonation.md) | Calculate how much rep would be gained. |
|
||||
|
||||
|
25
markdown/bitburner.reputationformulas.repfromdonation.md
Normal file
25
markdown/bitburner.reputationformulas.repfromdonation.md
Normal file
@ -0,0 +1,25 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) > [repFromDonation](./bitburner.reputationformulas.repfromdonation.md)
|
||||
|
||||
## ReputationFormulas.repFromDonation() method
|
||||
|
||||
Calculate how much rep would be gained.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
repFromDonation(amount: number, player: Player): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| amount | number | Amount of money donated |
|
||||
| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
number
|
||||
|
29
markdown/bitburner.singularity.b1tflum3.md
Normal file
29
markdown/bitburner.singularity.b1tflum3.md
Normal file
@ -0,0 +1,29 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [b1tflum3](./bitburner.singularity.b1tflum3.md)
|
||||
|
||||
## Singularity.b1tflum3() method
|
||||
|
||||
b1t\_flum3 into a different BN.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
b1tflum3(nextBN: number, callbackScript?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| nextBN | number | BN number to jump to |
|
||||
| callbackScript | string | Name of the script to launch in the next BN. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 16 GB \* 16/4/1
|
||||
|
31
markdown/bitburner.singularity.destroyw0r1dd43m0n.md
Normal file
31
markdown/bitburner.singularity.destroyw0r1dd43m0n.md
Normal file
@ -0,0 +1,31 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [destroyW0r1dD43m0n](./bitburner.singularity.destroyw0r1dd43m0n.md)
|
||||
|
||||
## Singularity.destroyW0r1dD43m0n() method
|
||||
|
||||
Destroy the w0r1d\_d43m0n and move on to the next BN.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destroyW0r1dD43m0n(nextBN: number, callbackScript?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| nextBN | number | BN number to jump to |
|
||||
| callbackScript | string | Name of the script to launch in the next BN. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 32 GB \* 16/4/1
|
||||
|
||||
You must have the special augment installed and the required hacking level OR Completed the final black op.
|
||||
|
@ -28,7 +28,7 @@ This function allows the player to get a list of programs available for purchase
|
||||
|
||||
```ts
|
||||
// NS1
|
||||
getDarkwebProgramsAvailable();
|
||||
getDarkwebPrograms();
|
||||
// returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
```
|
||||
|
||||
@ -37,7 +37,7 @@ getDarkwebProgramsAvailable();
|
||||
|
||||
```ts
|
||||
// NS2
|
||||
ns.getDarkwebProgramsAvailable();
|
||||
ns.getDarkwebPrograms();
|
||||
// returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
```
|
||||
|
||||
|
@ -26,5 +26,5 @@ void
|
||||
|
||||
RAM cost: 5 GB \* 16/4/1
|
||||
|
||||
This function will automatically install your Augmentations, resetting the game as usual.
|
||||
This function will automatically install your Augmentations, resetting the game as usual. If you do not own uninstalled Augmentations then the game will not reset.
|
||||
|
||||
|
@ -21,10 +21,12 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [applyToCompany(companyName, field)](./bitburner.singularity.applytocompany.md) | Apply for a job at a company. |
|
||||
| [b1tflum3(nextBN, callbackScript)](./bitburner.singularity.b1tflum3.md) | b1t\_flum3 into a different BN. |
|
||||
| [checkFactionInvitations()](./bitburner.singularity.checkfactioninvitations.md) | List all current faction invitations. |
|
||||
| [commitCrime(crime)](./bitburner.singularity.commitcrime.md) | Commit a crime. |
|
||||
| [connect(hostname)](./bitburner.singularity.connect.md) | Connect to a server. |
|
||||
| [createProgram(program, focus)](./bitburner.singularity.createprogram.md) | Create a program. |
|
||||
| [destroyW0r1dD43m0n(nextBN, callbackScript)](./bitburner.singularity.destroyw0r1dd43m0n.md) | Destroy the w0r1d\_d43m0n and move on to the next BN. |
|
||||
| [donateToFaction(faction, amount)](./bitburner.singularity.donatetofaction.md) | Donate to a faction. |
|
||||
| [getAugmentationCost(augName)](./bitburner.singularity.getaugmentationcost.md) | Get the price and reputation of an augmentation. |
|
||||
| [getAugmentationPrereq(augName)](./bitburner.singularity.getaugmentationprereq.md) | Get the pre-requisite of an augmentation. |
|
||||
@ -60,6 +62,7 @@ This API requires Source-File 4 to use. The RAM cost of all these functions is m
|
||||
| [purchaseAugmentation(faction, augmentation)](./bitburner.singularity.purchaseaugmentation.md) | Purchase an augmentation |
|
||||
| [purchaseProgram(programName)](./bitburner.singularity.purchaseprogram.md) | Purchase a program from the dark web. |
|
||||
| [purchaseTor()](./bitburner.singularity.purchasetor.md) | Purchase the TOR router. |
|
||||
| [quitJob(companyName)](./bitburner.singularity.quitjob.md) | Quit jobs by company. |
|
||||
| [setFocus(focus)](./bitburner.singularity.setfocus.md) | Set the players focus. |
|
||||
| [softReset(cbScript)](./bitburner.singularity.softreset.md) | Soft reset the game. |
|
||||
| [stopAction()](./bitburner.singularity.stopaction.md) | Stop the current action. |
|
||||
|
30
markdown/bitburner.singularity.quitjob.md
Normal file
30
markdown/bitburner.singularity.quitjob.md
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Singularity](./bitburner.singularity.md) > [quitJob](./bitburner.singularity.quitjob.md)
|
||||
|
||||
## Singularity.quitJob() method
|
||||
|
||||
Quit jobs by company.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
quitJob(companyName?: string): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| companyName | string | Name of the company. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 3 GB \* 16/4/1
|
||||
|
||||
This function will finish work with the company provided and quit any jobs.
|
||||
|
@ -27,6 +27,7 @@ If you are not in BitNode-10, then you must have Source-File 10 in order to use
|
||||
| [getSleeveStats(sleeveNumber)](./bitburner.sleeve.getsleevestats.md) | Get the stats of a sleeve. |
|
||||
| [getTask(sleeveNumber)](./bitburner.sleeve.gettask.md) | Get task of a sleeve. |
|
||||
| [purchaseSleeveAug(sleeveNumber, augName)](./bitburner.sleeve.purchasesleeveaug.md) | Purchase an aug for a sleeve. |
|
||||
| [setToBladeburnerAction(sleeveNumber, action, contract)](./bitburner.sleeve.settobladeburneraction.md) | Set a sleeve to perform bladeburner actions. |
|
||||
| [setToCommitCrime(sleeveNumber, name)](./bitburner.sleeve.settocommitcrime.md) | Set a sleeve to commit crime. |
|
||||
| [setToCompanyWork(sleeveNumber, companyName)](./bitburner.sleeve.settocompanywork.md) | Set a sleeve to work for a company. |
|
||||
| [setToFactionWork(sleeveNumber, factionName, factionWorkType)](./bitburner.sleeve.settofactionwork.md) | Set a sleeve to work for a faction. |
|
||||
|
34
markdown/bitburner.sleeve.settobladeburneraction.md
Normal file
34
markdown/bitburner.sleeve.settobladeburneraction.md
Normal file
@ -0,0 +1,34 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToBladeburnerAction](./bitburner.sleeve.settobladeburneraction.md)
|
||||
|
||||
## Sleeve.setToBladeburnerAction() method
|
||||
|
||||
Set a sleeve to perform bladeburner actions.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| sleeveNumber | number | Index of the sleeve to workout at the gym. |
|
||||
| action | string | Name of the action to be performed. |
|
||||
| contract | string | Name of the contract if applicable. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
|
||||
True if the sleeve started working out, false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
Return a boolean indicating whether or not the sleeve started working out.
|
||||
|
23
markdown/bitburner.stanek.acceptgift.md
Normal file
23
markdown/bitburner.stanek.acceptgift.md
Normal file
@ -0,0 +1,23 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Stanek](./bitburner.stanek.md) > [acceptGift](./bitburner.stanek.acceptgift.md)
|
||||
|
||||
## Stanek.acceptGift() method
|
||||
|
||||
Accept Stanek's Gift by joining the Church of the Machine God
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
acceptGift(): boolean;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
|
||||
true if the player is a member of the church and has the gift installed, false otherwise.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 2 GB
|
||||
|
@ -16,6 +16,7 @@ interface Stanek
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [acceptGift()](./bitburner.stanek.acceptgift.md) | Accept Stanek's Gift by joining the Church of the Machine God |
|
||||
| [activeFragments()](./bitburner.stanek.activefragments.md) | List of fragments in Stanek's Gift. |
|
||||
| [canPlaceFragment(rootX, rootY, rotation, fragmentId)](./bitburner.stanek.canplacefragment.md) | Check if fragment can be placed at specified location. |
|
||||
| [chargeFragment(rootX, rootY)](./bitburner.stanek.chargefragment.md) | Charge a fragment, increasing its power. |
|
||||
|
21
markdown/bitburner.userinterface.clearterminal.md
Normal file
21
markdown/bitburner.userinterface.clearterminal.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) > [UserInterface](./bitburner.userinterface.md) > [clearTerminal](./bitburner.userinterface.clearterminal.md)
|
||||
|
||||
## UserInterface.clearTerminal() method
|
||||
|
||||
Clear the Terminal window, as if the player ran `clear` in the terminal
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
clearTerminal(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0.2 GB
|
||||
|
@ -16,6 +16,7 @@ interface UserInterface
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [clearTerminal()](./bitburner.userinterface.clearterminal.md) | Clear the Terminal window, as if the player ran <code>clear</code> in the terminal |
|
||||
| [getGameInfo()](./bitburner.userinterface.getgameinfo.md) | Gets the current game information (version, commit, ...) |
|
||||
| [getStyles()](./bitburner.userinterface.getstyles.md) | Get the current styles |
|
||||
| [getTheme()](./bitburner.userinterface.gettheme.md) | Get the current theme |
|
||||
|
@ -9,7 +9,7 @@ Gets the cost to upgrade a warehouse to the next level
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;
|
||||
getUpgradeWarehouseCost(adivisionName: any, acityName: any, amt?: number): number;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -18,6 +18,7 @@ getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;
|
||||
| --- | --- | --- |
|
||||
| adivisionName | any | |
|
||||
| acityName | any | |
|
||||
| amt | number | amount of upgrades defaults to 1 |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
27
markdown/bitburner.warehouseapi.limitmaterialproduction.md
Normal file
27
markdown/bitburner.warehouseapi.limitmaterialproduction.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) > [WarehouseAPI](./bitburner.warehouseapi.md) > [limitMaterialProduction](./bitburner.warehouseapi.limitmaterialproduction.md)
|
||||
|
||||
## WarehouseAPI.limitMaterialProduction() method
|
||||
|
||||
Limit Material Production.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
limitMaterialProduction(divisionName: string, cityName: string, materialName: string, qty: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
| cityName | string | Name of the city |
|
||||
| materialName | string | Name of the material |
|
||||
| qty | number | Amount to limit to |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
27
markdown/bitburner.warehouseapi.limitproductproduction.md
Normal file
27
markdown/bitburner.warehouseapi.limitproductproduction.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) > [WarehouseAPI](./bitburner.warehouseapi.md) > [limitProductProduction](./bitburner.warehouseapi.limitproductproduction.md)
|
||||
|
||||
## WarehouseAPI.limitProductProduction() method
|
||||
|
||||
Limit Product Production.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
limitProductProduction(divisionName: string, cityName: string, productName: string, qty: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
| cityName | string | Name of the city |
|
||||
| productName | string | Name of the product |
|
||||
| qty | number | Amount to limit to |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
void
|
||||
|
@ -28,9 +28,11 @@ Requires the Warehouse API upgrade from your corporation.
|
||||
| [getMaterial(divisionName, cityName, materialName)](./bitburner.warehouseapi.getmaterial.md) | Get material data |
|
||||
| [getProduct(divisionName, productName)](./bitburner.warehouseapi.getproduct.md) | Get product data |
|
||||
| [getPurchaseWarehouseCost()](./bitburner.warehouseapi.getpurchasewarehousecost.md) | Gets the cost to purchase a warehouse |
|
||||
| [getUpgradeWarehouseCost(adivisionName, acityName)](./bitburner.warehouseapi.getupgradewarehousecost.md) | Gets the cost to upgrade a warehouse to the next level |
|
||||
| [getUpgradeWarehouseCost(adivisionName, acityName, amt)](./bitburner.warehouseapi.getupgradewarehousecost.md) | Gets the cost to upgrade a warehouse to the next level |
|
||||
| [getWarehouse(divisionName, cityName)](./bitburner.warehouseapi.getwarehouse.md) | Get warehouse data |
|
||||
| [hasWarehouse(adivisionName, acityName)](./bitburner.warehouseapi.haswarehouse.md) | Check if you have a warehouse in city |
|
||||
| [limitMaterialProduction(divisionName, cityName, materialName, qty)](./bitburner.warehouseapi.limitmaterialproduction.md) | Limit Material Production. |
|
||||
| [limitProductProduction(divisionName, cityName, productName, qty)](./bitburner.warehouseapi.limitproductproduction.md) | Limit Product Production. |
|
||||
| [makeProduct(divisionName, cityName, productName, designInvest, marketingInvest)](./bitburner.warehouseapi.makeproduct.md) | Create a new product |
|
||||
| [purchaseWarehouse(divisionName, cityName)](./bitburner.warehouseapi.purchasewarehouse.md) | Purchase warehouse for a new city |
|
||||
| [sellMaterial(divisionName, cityName, materialName, amt, price)](./bitburner.warehouseapi.sellmaterial.md) | Set material sell data. |
|
||||
@ -41,5 +43,5 @@ Requires the Warehouse API upgrade from your corporation.
|
||||
| [setProductMarketTA2(divisionName, productName, on)](./bitburner.warehouseapi.setproductmarketta2.md) | Set market TA 2 for a product. |
|
||||
| [setSmartSupply(divisionName, cityName, enabled)](./bitburner.warehouseapi.setsmartsupply.md) | Set smart supply |
|
||||
| [setSmartSupplyUseLeftovers(divisionName, cityName, materialName, enabled)](./bitburner.warehouseapi.setsmartsupplyuseleftovers.md) | Set whether smart supply uses leftovers before buying |
|
||||
| [upgradeWarehouse(divisionName, cityName)](./bitburner.warehouseapi.upgradewarehouse.md) | Upgrade warehouse |
|
||||
| [upgradeWarehouse(divisionName, cityName, amt)](./bitburner.warehouseapi.upgradewarehouse.md) | Upgrade warehouse |
|
||||
|
||||
|
@ -9,7 +9,7 @@ Upgrade warehouse
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
upgradeWarehouse(divisionName: string, cityName: string): void;
|
||||
upgradeWarehouse(divisionName: string, cityName: string, amt?: number): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -18,6 +18,7 @@ upgradeWarehouse(divisionName: string, cityName: string): void;
|
||||
| --- | --- | --- |
|
||||
| divisionName | string | Name of the division |
|
||||
| cityName | string | Name of the city |
|
||||
| amt | number | amount of upgrades defaults to 1 |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
@ -22,6 +22,7 @@ import { StockMarket } from "./DevMenu/ui/StockMarket";
|
||||
import { Sleeves } from "./DevMenu/ui/Sleeves";
|
||||
import { Stanek } from "./DevMenu/ui/Stanek";
|
||||
import { TimeSkip } from "./DevMenu/ui/TimeSkip";
|
||||
import { SaveFile } from "./DevMenu/ui/SaveFile";
|
||||
import { Achievements } from "./DevMenu/ui/Achievements";
|
||||
import { Entropy } from "./DevMenu/ui/Entropy";
|
||||
import Typography from "@mui/material/Typography";
|
||||
@ -65,6 +66,7 @@ export function DevMenuRoot(props: IProps): React.ReactElement {
|
||||
<TimeSkip player={props.player} engine={props.engine} />
|
||||
<Achievements player={props.player} engine={props.engine} />
|
||||
<Entropy player={props.player} engine={props.engine} />
|
||||
<SaveFile player={props.player} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
92
src/DevMenu/ui/SaveFile.tsx
Normal file
92
src/DevMenu/ui/SaveFile.tsx
Normal file
@ -0,0 +1,92 @@
|
||||
import React, { useState, useRef } from "react";
|
||||
|
||||
import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { saveObject } from "../../SaveObject";
|
||||
import { SnackbarEvents, ToastVariant } from "../../ui/React/Snackbar";
|
||||
import { Upload } from "@mui/icons-material";
|
||||
import { Button } from "@mui/material";
|
||||
import { OptionSwitch } from "../../ui/React/OptionSwitch";
|
||||
|
||||
// Update as additional BitNodes get implemented
|
||||
|
||||
interface IProps {
|
||||
player: IPlayer;
|
||||
}
|
||||
|
||||
export function SaveFile(props: IProps): React.ReactElement {
|
||||
const importInput = useRef<HTMLInputElement>(null);
|
||||
const [saveFile, setSaveFile] = useState("");
|
||||
const [restoreScripts, setRestoreScripts] = useState(true);
|
||||
const [restoreAugs, setRestoreAugs] = useState(true);
|
||||
const [restoreSFs, setRestoreSFs] = useState(true);
|
||||
|
||||
async function onImport(event: React.ChangeEvent<HTMLInputElement>): Promise<void> {
|
||||
try {
|
||||
const base64Save = await saveObject.getImportStringFromFile(event.target.files);
|
||||
const save = atob(base64Save);
|
||||
setSaveFile(save);
|
||||
} catch (ex: any) {
|
||||
SnackbarEvents.emit(ex.toString(), ToastVariant.ERROR, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
function startImport(): void {
|
||||
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;
|
||||
const ii = importInput.current;
|
||||
if (ii === null) throw new Error("import input should not be null");
|
||||
ii.click();
|
||||
}
|
||||
|
||||
function doRestore(): void {
|
||||
const save = JSON.parse(saveFile);
|
||||
console.log(Object.keys(save));
|
||||
// TODO: Continue here.
|
||||
}
|
||||
|
||||
return (
|
||||
<Accordion TransitionProps={{ unmountOnExit: true }}>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography>Save file</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Button onClick={startImport} startIcon={<Upload />} sx={{ gridArea: "import" }}>
|
||||
Select save file
|
||||
<input ref={importInput} type="file" hidden onChange={onImport} />
|
||||
</Button>
|
||||
<br />
|
||||
{saveFile !== "" && (
|
||||
<>
|
||||
<OptionSwitch
|
||||
checked={restoreScripts}
|
||||
onChange={(v) => setRestoreScripts(v)}
|
||||
text="Restore scripts"
|
||||
tooltip={<>Restore the save file home computer scripts.</>}
|
||||
/>
|
||||
<br />
|
||||
<OptionSwitch
|
||||
checked={restoreAugs}
|
||||
onChange={(v) => setRestoreAugs(v)}
|
||||
text="Restore Augmentations"
|
||||
tooltip={<>Restore the save file installed augmentations.</>}
|
||||
/>
|
||||
<br />
|
||||
<OptionSwitch
|
||||
checked={restoreSFs}
|
||||
onChange={(v) => setRestoreSFs(v)}
|
||||
text="Restore Source Files"
|
||||
tooltip={<>Restore the save file acquired source files.</>}
|
||||
/>
|
||||
<br />
|
||||
<Button onClick={doRestore}>Restore</Button>
|
||||
</>
|
||||
)}
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
);
|
||||
}
|
@ -99,7 +99,7 @@ function wrapFunction(
|
||||
if (safetyEnabled) workerScript.infiniteLoopSafetyCounter++;
|
||||
if (workerScript.infiniteLoopSafetyCounter > CONSTANTS.InfiniteLoopLimit)
|
||||
throw new Error(
|
||||
`Infinite loop without sleep detected. ${CONSTANTS.InfiniteLoopLimit} ns functions were called without sleep. This will cause your UI to hang.`,
|
||||
`Infinite loop without sleep detected. ${CONSTANTS.InfiniteLoopLimit} ns functions were called without 'sleep'. This will cause your UI to hang. Are you using 'asleep' by mistake?`,
|
||||
);
|
||||
return func(ctx)(...args);
|
||||
}
|
||||
|
7
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
7
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4299,12 +4299,18 @@ interface Stanek {
|
||||
acceptGift(): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface InfiltrationReward {
|
||||
tradeRep: number;
|
||||
sellCash: number;
|
||||
SoARep: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface InfiltrationLocation {
|
||||
location: any;
|
||||
reward: InfiltrationReward;
|
||||
@ -4797,6 +4803,7 @@ export interface NS {
|
||||
|
||||
/**
|
||||
* Suspends the script for n milliseconds. Doesn't block with concurrent calls.
|
||||
* You should prefer 'sleep' over 'asleep' except when doing very complex UI work.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user