mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 04:05:46 +01:00
Update docs after rebase
This commit is contained in:
parent
d34d720ab9
commit
8b52607113
164
dist/bitburner.d.ts
vendored
164
dist/bitburner.d.ts
vendored
@ -852,6 +852,74 @@ export declare interface CodingContract {
|
||||
* @public
|
||||
*/
|
||||
export declare interface Corporation extends WarehouseAPI, OfficeAPI {
|
||||
/**
|
||||
* Create a Corporation
|
||||
* @param divisionName - Name of the division
|
||||
* @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3
|
||||
* @returns true if created and false if not
|
||||
*/
|
||||
createCorporation(corporationName: string, selfFund: boolean): boolean;
|
||||
/**
|
||||
* Check if you have a one time unlockable upgrade
|
||||
* @param upgradeName - Name of the upgrade
|
||||
* @returns true if unlocked and false if not
|
||||
*/
|
||||
hasUnlockUpgrade(upgradeName: string): boolean;
|
||||
/**
|
||||
* Gets the cost to unlock a one time unlockable upgrade
|
||||
* @param upgradeName - Name of the upgrade
|
||||
* @returns cost of the upgrade
|
||||
*/
|
||||
getUnlockUpgradeCost(upgradeName: string): number;
|
||||
/**
|
||||
* Get the level of a levelable upgrade
|
||||
* @param upgradeName - Name of the upgrade
|
||||
* @returns the level of the upgrade
|
||||
*/
|
||||
getUpgradeLevel(upgradeName: string): number;
|
||||
/**
|
||||
* Gets the cost to unlock the next level of a levelable upgrade
|
||||
* @param upgradeName - Name of the upgrade
|
||||
* @returns cost of the upgrade
|
||||
*/
|
||||
getUpgradeLevelCost(upgradeName: string): number;
|
||||
/**
|
||||
* Gets the cost to expand into a new industry
|
||||
* @param industryName - Name of the industry
|
||||
* @returns cost
|
||||
*/
|
||||
getExpandIndustryCost(industryName: string): number;
|
||||
/**
|
||||
* Gets the cost to expand into a new city
|
||||
* @returns cost
|
||||
*/
|
||||
getExpandCityCost(): number;
|
||||
/**
|
||||
* Get an offer for investment based on you companies current valuation
|
||||
* @returns An offer of investment
|
||||
*/
|
||||
getInvestmentOffer(): InvestmentOffer;
|
||||
/**
|
||||
* Accept investment based on you companies current valuation
|
||||
* @remarks
|
||||
* Is based on current valuation and will not honer a specific Offer
|
||||
* @returns An offer of investment
|
||||
*/
|
||||
acceptInvestmentOffer(): boolean;
|
||||
/**
|
||||
* Go public
|
||||
* @param numShares - number of shares you would like to issue for your IPO
|
||||
* @returns true if you successfully go public, false if not
|
||||
*/
|
||||
goPublic(numShares: number): boolean;
|
||||
/**
|
||||
* Bribe a faction
|
||||
* @param factionName - Faction name
|
||||
* @param amountCash - Amount of money to bribe
|
||||
* @param amountShares - Amount of shares to bribe
|
||||
* @returns True if successful, false if not
|
||||
*/
|
||||
bribe(factionName: string, amountCash: number, amountShares: number): boolean;
|
||||
/**
|
||||
* Get corporation data
|
||||
* @returns Corporation data
|
||||
@ -876,7 +944,7 @@ export declare interface Corporation extends WarehouseAPI, OfficeAPI {
|
||||
*/
|
||||
expandCity(divisionName: string, cityName: string): void;
|
||||
/**
|
||||
* Unlock an upgrade.
|
||||
* Unlock an upgrade
|
||||
* @param upgradeName - Name of the upgrade
|
||||
*/
|
||||
unlockUpgrade(upgradeName: string): void;
|
||||
@ -919,6 +987,8 @@ export declare interface CorporationInfo {
|
||||
sharePrice: number;
|
||||
/** State of the corporation. Possible states are START, PURCHASE, PRODUCTION, SALE, EXPORT. */
|
||||
state: string;
|
||||
/** Array of all divisions */
|
||||
divisions: Division[];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -997,6 +1067,8 @@ export declare interface Division {
|
||||
upgrades: number[];
|
||||
/** Cities in which this division has expanded */
|
||||
cities: string[];
|
||||
/** Products developed by this division */
|
||||
products: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2213,6 +2285,19 @@ export declare interface HacknetServersFormulas {
|
||||
constants(): HacknetServerConstants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Corporation investment offer
|
||||
* @public
|
||||
*/
|
||||
export declare interface InvestmentOffer {
|
||||
/** Amount of funds you will get from this investment */
|
||||
funds: number;
|
||||
/** Amount of share you will give in exchange for this investment */
|
||||
shares: number;
|
||||
/** Current round of funding (max 4) */
|
||||
round: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface Styles
|
||||
* @internal
|
||||
@ -2233,6 +2318,10 @@ export declare interface Material {
|
||||
qty: number;
|
||||
/** Quality of the material */
|
||||
qlt: number;
|
||||
/** Amount of material produced */
|
||||
prod: number;
|
||||
/** Amount of material sold */
|
||||
sell: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4377,7 +4466,7 @@ export declare interface OfficeAPI {
|
||||
*/
|
||||
assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise<void>;
|
||||
/**
|
||||
* Assign an employee to a job.
|
||||
* Hire an employee.
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @returns The newly hired employee, if any
|
||||
@ -4391,7 +4480,7 @@ export declare interface OfficeAPI {
|
||||
*/
|
||||
upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;
|
||||
/**
|
||||
* Assign an employee to a job.
|
||||
* Throw a party for your employees
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param costPerEmployee - Amount to spend per employee.
|
||||
@ -4411,7 +4500,7 @@ export declare interface OfficeAPI {
|
||||
*/
|
||||
hireAdVert(divisionName: string): void;
|
||||
/**
|
||||
* Hire AdVert.
|
||||
* Purchase a research
|
||||
* @param divisionName - Name of the division
|
||||
* @param researchName - Name of the research
|
||||
*/
|
||||
@ -4431,6 +4520,49 @@ export declare interface OfficeAPI {
|
||||
* @returns Employee data
|
||||
*/
|
||||
getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;
|
||||
/**
|
||||
* Get the cost to Hire AdVert
|
||||
* @param divisionName - Name of the division
|
||||
* @returns Cost
|
||||
*/
|
||||
getHireAdVertCost(divisionName: string): number;
|
||||
/**
|
||||
* Get the number of times you have Hired AdVert
|
||||
* @param divisionName - Name of the division
|
||||
* @returns Number of times you have Hired AdVert
|
||||
*/
|
||||
getHireAdVertCount(adivisionName: string): number;
|
||||
/**
|
||||
* Get the cost to unlock research
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @returns cost
|
||||
*/
|
||||
getResearchCost(divisionName: string, researchName: string): number;
|
||||
/**
|
||||
* Gets if you have unlocked a research
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @returns true is unlocked, false if not
|
||||
*/
|
||||
hasResearched(divisionName: string, researchName: string): boolean;
|
||||
/**
|
||||
* Set the auto job assignment for a job
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param job - Name of the job
|
||||
* @param amount - Number of employees to assign to that job
|
||||
* @returns A promise that is fulfilled when the assignment is complete.
|
||||
*/
|
||||
setAutoJobAssignment(divisionName: string, cityName: string, job: string, amount: number): Promise<boolean>;
|
||||
/**
|
||||
* Cost to Upgrade office size.
|
||||
* @param divisionName - Name of the division
|
||||
* @param cityName - Name of the city
|
||||
* @param size - Amount of positions to open
|
||||
* @returns Cost of upgrading the office
|
||||
*/
|
||||
getOfficeSizeUpgradeCost(divisionName: string, cityName: string, asize: number): number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4533,6 +4665,7 @@ export declare interface Player {
|
||||
jobs: any;
|
||||
factions: string[];
|
||||
tor: boolean;
|
||||
hasCorporation: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4594,6 +4727,12 @@ export declare interface Product {
|
||||
pCost: number;
|
||||
/** Sell cost, can be "MP+5" */
|
||||
sCost: string | number;
|
||||
/** Data refers to the production, sale, and quantity of the products
|
||||
* These values are specific to a city
|
||||
* For each city, the data is [qty, prod, sell] */
|
||||
cityData: {[key: string]:number[]};
|
||||
/** Creation progress - A number between 0-100 representing percentage */
|
||||
developmentProgress: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6404,6 +6543,8 @@ export declare interface Warehouse {
|
||||
size: number;
|
||||
/** Used space in the warehouse */
|
||||
sizeUsed: number;
|
||||
/** Smart Supply status in the warehouse */
|
||||
smartSupplyEnabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6572,6 +6713,21 @@ export declare interface WarehouseAPI {
|
||||
designInvest: number,
|
||||
marketingInvest: number,
|
||||
): void;
|
||||
/**
|
||||
* Gets the cost to purchase a warehouse
|
||||
* @returns cost
|
||||
*/
|
||||
getPurchaseWarehouseCost(): number;
|
||||
/**
|
||||
* Gets the cost to upgrade a warehouse to the next level
|
||||
* @returns cost to upgrade
|
||||
*/
|
||||
getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;
|
||||
/**
|
||||
* Check if you have a warehouse in city
|
||||
* @returns true if warehouse is present, false if not
|
||||
*/
|
||||
hasWarehouse(adivisionName: any, acityName: any): boolean;
|
||||
}
|
||||
|
||||
export { }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [clear](./bitburner.iport.clear.md)
|
||||
|
||||
## IPort.clear property
|
||||
|
||||
removes all data from port
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
clear: () => void;
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [empty](./bitburner.iport.empty.md)
|
||||
|
||||
## IPort.empty property
|
||||
|
||||
check if port is empty
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
empty: () => boolean;
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [full](./bitburner.iport.full.md)
|
||||
|
||||
## IPort.full property
|
||||
|
||||
check if port is full
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
full: () => boolean;
|
||||
```
|
@ -1,26 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md)
|
||||
|
||||
## IPort interface
|
||||
|
||||
Interface of a netscript port
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface IPort
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [clear](./bitburner.iport.clear.md) | () => void | removes all data from port |
|
||||
| [empty](./bitburner.iport.empty.md) | () => boolean | check if port is empty |
|
||||
| [full](./bitburner.iport.full.md) | () => boolean | check if port is full |
|
||||
| [peek](./bitburner.iport.peek.md) | () => any | reads first element without removing it from port if no data in port returns "NULL PORT DATA" |
|
||||
| [read](./bitburner.iport.read.md) | () => any | reads and removes first element from port if no data in port returns "NULL PORT DATA" |
|
||||
| [tryWrite](./bitburner.iport.trywrite.md) | (value: any) => boolean | add data to port if not full. |
|
||||
| [write](./bitburner.iport.write.md) | (value: any) => any | write data to the port and removes and returns first element if full |
|
||||
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [peek](./bitburner.iport.peek.md)
|
||||
|
||||
## IPort.peek property
|
||||
|
||||
reads first element without removing it from port if no data in port returns "NULL PORT DATA"
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
peek: () => any;
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [read](./bitburner.iport.read.md)
|
||||
|
||||
## IPort.read property
|
||||
|
||||
reads and removes first element from port if no data in port returns "NULL PORT DATA"
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
read: () => any;
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [tryWrite](./bitburner.iport.trywrite.md)
|
||||
|
||||
## IPort.tryWrite property
|
||||
|
||||
add data to port if not full.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
tryWrite: (value: any) => boolean;
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [IPort](./bitburner.iport.md) > [write](./bitburner.iport.write.md)
|
||||
|
||||
## IPort.write property
|
||||
|
||||
write data to the port and removes and returns first element if full
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
write: (value: any) => any;
|
||||
```
|
@ -53,7 +53,6 @@
|
||||
| [HacknetServerConstants](./bitburner.hacknetserverconstants.md) | Hacknet server related constants |
|
||||
| [HacknetServersFormulas](./bitburner.hacknetserversformulas.md) | Hacknet Server formulas |
|
||||
| [InvestmentOffer](./bitburner.investmentoffer.md) | Corporation investment offer |
|
||||
| [IPort](./bitburner.iport.md) | Interface of a netscript port |
|
||||
| [Material](./bitburner.material.md) | Material in a warehouse |
|
||||
| [NetscriptPort](./bitburner.netscriptport.md) | Object representing a port. A port is a serialized queue. |
|
||||
| [NodeStats](./bitburner.nodestats.md) | Object representing all the values related to a hacknet node. |
|
||||
|
Loading…
Reference in New Issue
Block a user