mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 07:33:48 +01:00
Fix minimum corp employee stat
* minEmployeeDecay is now part of CorpConstants and has a value of 10. This replaces Office.minEne/minMor/minHap * Also removed some unnecessary files in dist/ext for MathJax * Rebuilt documentation to remove minHap/minMor/minEne from getOffice, and add minEmployeeDecay to corporation.getConstants
This commit is contained in:
parent
b2ecd82acc
commit
4ab29e9c60
21
dist/bitburner.d.ts
vendored
21
dist/bitburner.d.ts
vendored
@ -827,6 +827,8 @@ export declare interface CorpConstants {
|
|||||||
employeeRaiseAmount: number;
|
employeeRaiseAmount: number;
|
||||||
/** Max products for a division without upgrades */
|
/** Max products for a division without upgrades */
|
||||||
maxProductsBase: number;
|
maxProductsBase: number;
|
||||||
|
/** The minimum decay value for happiness/morale/energy */
|
||||||
|
minEmployeeDecay: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @public */
|
/** @public */
|
||||||
@ -1928,6 +1930,7 @@ export declare interface HackingFormulas {
|
|||||||
hackPercent(server: Server, player: Person): number;
|
hackPercent(server: Server, player: Person): number;
|
||||||
/**
|
/**
|
||||||
* Calculate the percent a server would grow to.
|
* Calculate the percent a server would grow to.
|
||||||
|
* Not exact due to limitations of mathematics.
|
||||||
* (Ex: 3.0 would would grow the server to 300% of its current value.)
|
* (Ex: 3.0 would would grow the server to 300% of its current value.)
|
||||||
* @param server - Server info from {@link NS.getServer | getServer}
|
* @param server - Server info from {@link NS.getServer | getServer}
|
||||||
* @param threads - Amount of thread.
|
* @param threads - Amount of thread.
|
||||||
@ -3148,11 +3151,11 @@ export declare interface NS {
|
|||||||
*
|
*
|
||||||
* Use your hacking skills to increase the amount of money available on a server.
|
* Use your hacking skills to increase the amount of money available on a server.
|
||||||
* The runtime for this command depends on your hacking level and the target server’s
|
* The runtime for this command depends on your hacking level and the target server’s
|
||||||
* security level. When `grow` completes, the money available on a target server will
|
* security level. When `grow` completes, the money available on a target server will be increased
|
||||||
* be increased by a certain, fixed percentage. This percentage is determined by the
|
* by amount equal to the number of threads used and a certain, fixed percentage of current money on
|
||||||
* target server’s growth rate (which varies between servers) and security level. Generally,
|
* the server. This percentage is determined by the target server’s growth rate (which varies between servers)
|
||||||
* higher-level servers have higher growth rates. The {@link NS.getServerGrowth | getServerGrowth} function can be used
|
* and security level. Generally, higher-level servers have higher growth rates.
|
||||||
* to obtain a server’s growth rate.
|
* The {@link NS.getServerGrowth | getServerGrowth} function can be used to obtain a server’s growth rate.
|
||||||
*
|
*
|
||||||
* Like {@link NS.hack | hack}, `grow` can be called on any server, regardless of where the script is running.
|
* Like {@link NS.hack | hack}, `grow` can be called on any server, regardless of where the script is running.
|
||||||
* The grow() command requires root access to the target server, but there is no required hacking
|
* The grow() command requires root access to the target server, but there is no required hacking
|
||||||
@ -3306,6 +3309,8 @@ export declare interface NS {
|
|||||||
* the amount of money available on the specified server by the specified amount.
|
* the amount of money available on the specified server by the specified amount.
|
||||||
* The specified amount is multiplicative and is in decimal form, not percentage.
|
* The specified amount is multiplicative and is in decimal form, not percentage.
|
||||||
*
|
*
|
||||||
|
* Due to limitations of mathematics, this function won't be the true value, but an approximation.
|
||||||
|
*
|
||||||
* Warning: The value returned by this function isn’t necessarily a whole number.
|
* Warning: The value returned by this function isn’t necessarily a whole number.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@ -5406,16 +5411,10 @@ export declare interface Office {
|
|||||||
loc: CityName;
|
loc: CityName;
|
||||||
/** Maximum number of employee */
|
/** Maximum number of employee */
|
||||||
size: number;
|
size: number;
|
||||||
/** Minimum amount of energy of the employees */
|
|
||||||
minEne: number;
|
|
||||||
/** Maximum amount of energy of the employees */
|
/** Maximum amount of energy of the employees */
|
||||||
maxEne: number;
|
maxEne: number;
|
||||||
/** Minimum happiness of the employees */
|
|
||||||
minHap: number;
|
|
||||||
/** Maximum happiness of the employees */
|
/** Maximum happiness of the employees */
|
||||||
maxHap: number;
|
maxHap: number;
|
||||||
/** Minimum morale of the employees */
|
|
||||||
minMor: number;
|
|
||||||
/** Maximum morale of the employees */
|
/** Maximum morale of the employees */
|
||||||
maxMor: number;
|
maxMor: number;
|
||||||
/** Amount of employees */
|
/** Amount of employees */
|
||||||
|
183
dist/ext/MathJax-3.2.2/README.md
vendored
183
dist/ext/MathJax-3.2.2/README.md
vendored
@ -1,183 +0,0 @@
|
|||||||
# MathJax (Source Repository)
|
|
||||||
|
|
||||||
![GitHub release version](https://img.shields.io/github/v/release/mathjax/MathJax-src.svg?sort=semver)
|
|
||||||
![GitHub release version (v2)](https://img.shields.io/github/package-json/v/mathjax/MathJax/legacy-v2.svg?label=release-v2)
|
|
||||||
![NPM version](https://img.shields.io/npm/v/mathjax.svg?style=flat)
|
|
||||||
<a href="http://www.numfocus.org">![powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat)</a>
|
|
||||||
![jsdelivr rank](https://flat.badgen.net/jsdelivr/rank/npm/mathjax?color=green)
|
|
||||||
![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/mathjax)
|
|
||||||
![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax?label=npm)
|
|
||||||
![npm monthly downloads (full)](https://img.shields.io/npm/dm/mathjax-full?label=npm%20%28full%29)
|
|
||||||
![npm total downloads](https://img.shields.io/npm/dt/mathjax.svg?style=flat&label=npm%20total)
|
|
||||||
![npm total downloads](https://img.shields.io/npm/dt/mathjax-full.svg?style=flat&label=npm%20total%20%28full%29)
|
|
||||||
|
|
||||||
## Beautiful math in all browsers
|
|
||||||
|
|
||||||
MathJax is an open-source JavaScript display engine for LaTeX, MathML,
|
|
||||||
and AsciiMath notation that works in all modern browsers. It was
|
|
||||||
designed with the goal of consolidating the recent advances in web
|
|
||||||
technologies into a single, definitive, math-on-the-web platform
|
|
||||||
supporting the major browsers and operating systems. It requires no
|
|
||||||
setup on the part of the user (no plugins to download or software to
|
|
||||||
install), so the page author can write web documents that include
|
|
||||||
mathematics and be confident that users will be able to view it
|
|
||||||
naturally and easily. Simply include MathJax and some mathematics in
|
|
||||||
a web page, and MathJax does the rest.
|
|
||||||
|
|
||||||
Some of the main features of MathJax include:
|
|
||||||
|
|
||||||
- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
|
|
||||||
|
|
||||||
- Supported in most browsers with no plug-ins, extra fonts, or special
|
|
||||||
setup for the reader
|
|
||||||
|
|
||||||
- Easy for authors, flexible for publishers, extensible for developers
|
|
||||||
|
|
||||||
- Supports math accessibility, cut-and-paste interoperability, and other
|
|
||||||
advanced functionality
|
|
||||||
|
|
||||||
- Powerful API for integration with other web applications
|
|
||||||
|
|
||||||
See <http://www.mathjax.org/> for additional details about MathJax,
|
|
||||||
and <https://docs.mathjax.org> for the MathJax documentation.
|
|
||||||
|
|
||||||
## What's in this Repository
|
|
||||||
|
|
||||||
This repository contains the source files for MathJax, which are
|
|
||||||
written in TypeScript. These are compiled into JavaScript files and
|
|
||||||
then combined into component files for use on the web. The component
|
|
||||||
files are available from several [CDN services that host
|
|
||||||
MathJax](https://docs.mathjax.org/en/latest/web/start.html#using-mathjax-from-a-content-delivery-network-cdn),
|
|
||||||
and also from the [MathJax Component
|
|
||||||
Repository](https://github.com/mathjax/MathJax). Node applications
|
|
||||||
can use either the component files, or call the MathJax JavaScript
|
|
||||||
files directly.
|
|
||||||
|
|
||||||
## Installation and Use
|
|
||||||
|
|
||||||
### Using MathJax in web browsers
|
|
||||||
|
|
||||||
If you are loading MathJax from a CDN into a web page, there is no
|
|
||||||
need to install anything. Simply use a `script` tag that loads
|
|
||||||
MathJax from the CDN. E.g.,
|
|
||||||
|
|
||||||
``` html
|
|
||||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
||||||
```
|
|
||||||
|
|
||||||
See the [MathJax
|
|
||||||
documentation](https://docs.mathjax.org/en/latest/index.html#browser-components),
|
|
||||||
the [MathJax Web Demos](https://github.com/mathjax/MathJax-demos-web),
|
|
||||||
and the [MathJax Component
|
|
||||||
Repository](https://github.com/mathjax/MathJax-demos-web) for more information.
|
|
||||||
|
|
||||||
|
|
||||||
### Using MathJax Components in node applications
|
|
||||||
|
|
||||||
To use MathJax components in a node application, install the `mathjax` package:
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
npm install mathjax@3
|
|
||||||
```
|
|
||||||
|
|
||||||
(we are still making updates to version 2, so you should include `@3`
|
|
||||||
since the latest chronological version may not be version 3).
|
|
||||||
|
|
||||||
Then require `mathjax` within your application:
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
require('mathjax').init({ ... }).then((MathJax) => { ... });
|
|
||||||
```
|
|
||||||
|
|
||||||
where the first `{ ... }` is a MathJax configuration, and the second
|
|
||||||
`{ ... }` is the code to run after MathJax has been loaded. E.g.
|
|
||||||
|
|
||||||
``` javascript
|
|
||||||
require('mathjax').init({
|
|
||||||
loader: {load: ['input/tex', 'output/svg']}
|
|
||||||
}).then((MathJax) => {
|
|
||||||
const svg = MathJax.tex2svg('\\frac{1}{x^2-1}', {display: true});
|
|
||||||
console.log(MathJax.startup.adaptor.outerHTML(svg));
|
|
||||||
}).catch((err) => console.log(err.message));
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note:** this technique is for node-based applications only, not for
|
|
||||||
browser applications. This method sets up an alternative DOM
|
|
||||||
implementation, which you don't need in the browser, and tells MathJax
|
|
||||||
to use node's `require()` command to load external modules. This
|
|
||||||
setup will not work properly in the browser, even if you webpack it or
|
|
||||||
bundle it in other ways.
|
|
||||||
|
|
||||||
See the
|
|
||||||
[documentation](https://docs.mathjax.org/en/latest/index.html#server-nodejs)
|
|
||||||
and the [MathJax Node
|
|
||||||
Repository](https://github.com/mathjax/MathJax-demos-node) for more details.
|
|
||||||
|
|
||||||
|
|
||||||
### Using MathJax modules directly in node applications
|
|
||||||
|
|
||||||
You can use the MathJax JavaScript files (as opposed to MathJax
|
|
||||||
components) directly in node applications. This gives you the
|
|
||||||
greatest flexibility, but requires more coding. To use this approach,
|
|
||||||
install the `mathjax-full` package:
|
|
||||||
|
|
||||||
npm install mathjax-full
|
|
||||||
|
|
||||||
This will provide the following directories:
|
|
||||||
|
|
||||||
node_modules/
|
|
||||||
mathjax-full/
|
|
||||||
ts/ the MathJax source TypeScript files
|
|
||||||
js/ the compiled JavaScript files
|
|
||||||
components/ the component build tools and control files
|
|
||||||
es5/ the packages component files
|
|
||||||
|
|
||||||
You can use the components and JavaScript files directly in your node
|
|
||||||
applications (see the [MathJax node
|
|
||||||
demos](https://github.com/mathjax/MathJax-demos-node) for examples).
|
|
||||||
|
|
||||||
If you want to work from the GitHub repository directly, then do the following:
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
git clone https://github.com/mathjax/MathJax-src.git mathjax-src
|
|
||||||
cd mathjax-src
|
|
||||||
npm run --silent compile
|
|
||||||
npm run --silent make-components
|
|
||||||
```
|
|
||||||
|
|
||||||
in order to compile the JavaScript files from the TypeScript source,
|
|
||||||
and build the component files from the JavaScript files.
|
|
||||||
|
|
||||||
## Code Contributions
|
|
||||||
|
|
||||||
If you are interested in contributing code to MathJax, please see the
|
|
||||||
[documentation for contributors](CONTRIBUTING.md) for details on how
|
|
||||||
to do this, and for the policies for making pull requests. In
|
|
||||||
particular, please be careful that you are working from the proper
|
|
||||||
branch in the git repository, or you may be asked to rebase your
|
|
||||||
changes when you make a pull request.
|
|
||||||
|
|
||||||
## MathJax Community
|
|
||||||
|
|
||||||
The main MathJax website is <http://www.mathjax.org>, and it includes
|
|
||||||
announcements and other important information. A [MathJax user
|
|
||||||
forum](http://groups.google.com/group/mathjax-users) for asking
|
|
||||||
questions and getting assistance is hosted at Google, and the [MathJax
|
|
||||||
bug tracker](https://github.com/mathjax/MathJax/issues) is hosted
|
|
||||||
at GitHub.
|
|
||||||
|
|
||||||
Before reporting a bug, please check that it has not already been
|
|
||||||
reported. Also, please use the bug tracker (rather than the help
|
|
||||||
forum) for reporting bugs, and use the user's forum (rather than the
|
|
||||||
bug tracker) for questions about how to use MathJax.
|
|
||||||
|
|
||||||
## MathJax Resources
|
|
||||||
|
|
||||||
* [MathJax Documentation](https://docs.mathjax.org)
|
|
||||||
* [MathJax Components](https://github.com/mathjax/MathJax)
|
|
||||||
* [MathJax Source Code](https://github.com/mathjax/MathJax-src)
|
|
||||||
* [MathJax Web Examples](https://github.com/mathjax/MathJax-demos-web)
|
|
||||||
* [MathJax Node Examples](https://github.com/mathjax/MathJax-demos-node)
|
|
||||||
* [MathJax Bug Tracker](https://github.com/mathjax/MathJax/issues)
|
|
||||||
* [MathJax Users' Group](http://groups.google.com/group/mathjax-users)
|
|
||||||
|
|
1
dist/ext/MathJax-3.2.2/es5/mml-chtml.js
vendored
1
dist/ext/MathJax-3.2.2/es5/mml-chtml.js
vendored
File diff suppressed because one or more lines are too long
1
dist/ext/MathJax-3.2.2/es5/mml-svg.js
vendored
1
dist/ext/MathJax-3.2.2/es5/mml-svg.js
vendored
File diff suppressed because one or more lines are too long
1
dist/ext/MathJax-3.2.2/es5/output/svg.js
vendored
1
dist/ext/MathJax-3.2.2/es5/output/svg.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
70
dist/ext/MathJax-3.2.2/package.json
vendored
70
dist/ext/MathJax-3.2.2/package.json
vendored
@ -1,70 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "mathjax-full",
|
|
||||||
"version": "3.2.2",
|
|
||||||
"description": "Beautiful and accessible math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all browsers and in server-side node applications. This package includes the source code as well as the packaged components.",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"main": "components/src/node-main/node-main.js",
|
|
||||||
"files": [
|
|
||||||
"/es5",
|
|
||||||
"/js",
|
|
||||||
"/ts",
|
|
||||||
"/components",
|
|
||||||
"LICENSE",
|
|
||||||
"README.md",
|
|
||||||
"CONTRIBUTING.md",
|
|
||||||
"tsconfig.json",
|
|
||||||
"tslint.json"
|
|
||||||
],
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/mathjax/Mathjax-src/"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"MathJax",
|
|
||||||
"math",
|
|
||||||
"svg",
|
|
||||||
"HTML",
|
|
||||||
"MathML",
|
|
||||||
"TeX",
|
|
||||||
"AsciiMath"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"clean:js": "npx rimraf js",
|
|
||||||
"clean:es5": "npx rimraf es5",
|
|
||||||
"clean:lib": "npx rimraf 'components/src/**/lib'",
|
|
||||||
"clean": "npm run --silent clean:js && npm run --silent clean:es5 && npm run --silent clean:lib",
|
|
||||||
"copy:mj2": "npx copyfiles -u 1 'ts/input/asciimath/mathjax2/**/*' js",
|
|
||||||
"copy:mml3": "npx copyfiles -u 1 'ts/input/mathml/mml3/mml3.sef.json' js",
|
|
||||||
"precompile": "npm run --silent clean:js",
|
|
||||||
"compile": "npx tsc",
|
|
||||||
"postcompile": "npm run --silent copy:mj2 && npm run --silent copy:mml3",
|
|
||||||
"premake-components": "npm run --silent clean:es5 && npm run --silent clean:lib",
|
|
||||||
"make-components": "cd components && node bin/makeAll src | grep --line-buffered 'Building\\|Webpacking\\|Copying\\|npx'",
|
|
||||||
"premake-mml3-xslt": "cd ts/input/mathml/mml3 && grep '^\\s*\\(<\\|or\\|xmlns\\|excl\\|\">\\)' mml3.ts > mml3.xsl",
|
|
||||||
"make-mml3-xslt": "cd ts/input/mathml/mml3 && npx xslt3 -t -xsl:mml3.xsl -export:mml3.sef.json -nogo",
|
|
||||||
"postmake-mml3-xslt": "npx rimraf ts/input/mathml/mml3/mml3.xsl"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.17.12",
|
|
||||||
"@babel/preset-env": "^7.17.12",
|
|
||||||
"babel-loader": "^8.2.5",
|
|
||||||
"copyfiles": "^2.4.1",
|
|
||||||
"diff": "^5.0.0",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"tape": "^5.5.3",
|
|
||||||
"terser-webpack-plugin": "^5.3.1",
|
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-jsdoc-rules": "^0.2.0",
|
|
||||||
"tslint-unix-formatter": "^0.2.0",
|
|
||||||
"typescript": "^4.6.4",
|
|
||||||
"typescript-tools": "^0.3.1",
|
|
||||||
"webpack": "^5.72.1",
|
|
||||||
"webpack-cli": "^4.9.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"esm": "^3.2.25",
|
|
||||||
"mhchemparser": "^4.1.0",
|
|
||||||
"mj-context-menu": "^0.6.1",
|
|
||||||
"speech-rule-engine": "^4.0.6"
|
|
||||||
}
|
|
||||||
}
|
|
@ -31,6 +31,7 @@ interface CorpConstants
|
|||||||
| [marketCyclesPerEmployeeRaise](./bitburner.corpconstants.marketcyclesperemployeeraise.md) | number | |
|
| [marketCyclesPerEmployeeRaise](./bitburner.corpconstants.marketcyclesperemployeeraise.md) | number | |
|
||||||
| [materialNames](./bitburner.corpconstants.materialnames.md) | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | Names of all materials |
|
| [materialNames](./bitburner.corpconstants.materialnames.md) | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | Names of all materials |
|
||||||
| [maxProductsBase](./bitburner.corpconstants.maxproductsbase.md) | number | Max products for a division without upgrades |
|
| [maxProductsBase](./bitburner.corpconstants.maxproductsbase.md) | number | Max products for a division without upgrades |
|
||||||
|
| [minEmployeeDecay](./bitburner.corpconstants.minemployeedecay.md) | number | The minimum decay value for happiness/morale/energy |
|
||||||
| [officeInitialCost](./bitburner.corpconstants.officeinitialcost.md) | number | |
|
| [officeInitialCost](./bitburner.corpconstants.officeinitialcost.md) | number | |
|
||||||
| [officeInitialSize](./bitburner.corpconstants.officeinitialsize.md) | number | |
|
| [officeInitialSize](./bitburner.corpconstants.officeinitialsize.md) | number | |
|
||||||
| [officeSizeUpgradeCostBase](./bitburner.corpconstants.officesizeupgradecostbase.md) | number | |
|
| [officeSizeUpgradeCostBase](./bitburner.corpconstants.officesizeupgradecostbase.md) | number | |
|
||||||
|
13
markdown/bitburner.corpconstants.minemployeedecay.md
Normal file
13
markdown/bitburner.corpconstants.minemployeedecay.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) > [CorpConstants](./bitburner.corpconstants.md) > [minEmployeeDecay](./bitburner.corpconstants.minemployeedecay.md)
|
||||||
|
|
||||||
|
## CorpConstants.minEmployeeDecay property
|
||||||
|
|
||||||
|
The minimum decay value for happiness/morale/energy
|
||||||
|
|
||||||
|
<b>Signature:</b>
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
minEmployeeDecay: number;
|
||||||
|
```
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## HackingFormulas.growPercent() method
|
## HackingFormulas.growPercent() method
|
||||||
|
|
||||||
Calculate the percent a server would grow to. (Ex: 3.0 would would grow the server to 300% of its current value.)
|
Calculate the percent a server would grow to. Not exact due to limitations of mathematics. (Ex: 3.0 would would grow the server to 300% of its current value.)
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ interface HackingFormulas
|
|||||||
|
|
||||||
| Method | Description |
|
| Method | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | Calculate the percent a server would grow to. (Ex: 3.0 would would grow the server to 300% of its current value.) |
|
| [growPercent(server, threads, player, cores)](./bitburner.hackingformulas.growpercent.md) | Calculate the percent a server would grow to. Not exact due to limitations of mathematics. (Ex: 3.0 would would grow the server to 300% of its current value.) |
|
||||||
| [growTime(server, player)](./bitburner.hackingformulas.growtime.md) | Calculate grow time. |
|
| [growTime(server, player)](./bitburner.hackingformulas.growtime.md) | Calculate grow time. |
|
||||||
| [hackChance(server, player)](./bitburner.hackingformulas.hackchance.md) | Calculate hack chance. (Ex: 0.25 would indicate a 25% chance of success.) |
|
| [hackChance(server, player)](./bitburner.hackingformulas.hackchance.md) | Calculate hack chance. (Ex: 0.25 would indicate a 25% chance of success.) |
|
||||||
| [hackExp(server, player)](./bitburner.hackingformulas.hackexp.md) | Calculate hack exp for one thread. |
|
| [hackExp(server, player)](./bitburner.hackingformulas.hackexp.md) | Calculate hack exp for one thread. |
|
||||||
|
@ -29,7 +29,7 @@ The number by which the money on the server was multiplied for the growth.
|
|||||||
|
|
||||||
RAM cost: 0.15 GB
|
RAM cost: 0.15 GB
|
||||||
|
|
||||||
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target server’s security level. When `grow` completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage is determined by the target server’s growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The [getServerGrowth](./bitburner.ns.getservergrowth.md) function can be used to obtain a server’s growth rate.
|
Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target server’s security level. When `grow` completes, the money available on a target server will be increased by amount equal to the number of threads used and a certain, fixed percentage of current money on the server. This percentage is determined by the target server’s growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The [getServerGrowth](./bitburner.ns.getservergrowth.md) function can be used to obtain a server’s growth rate.
|
||||||
|
|
||||||
Like [hack](./bitburner.ns.hack.md)<!-- -->, `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004.
|
Like [hack](./bitburner.ns.hack.md)<!-- -->, `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004.
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ RAM cost: 1 GB
|
|||||||
|
|
||||||
This function returns the number of “growths” needed in order to increase the amount of money available on the specified server by the specified amount. The specified amount is multiplicative and is in decimal form, not percentage.
|
This function returns the number of “growths” needed in order to increase the amount of money available on the specified server by the specified amount. The specified amount is multiplicative and is in decimal form, not percentage.
|
||||||
|
|
||||||
|
Due to limitations of mathematics, this function won't be the true value, but an approximation.
|
||||||
|
|
||||||
Warning: The value returned by this function isn’t necessarily a whole number.
|
Warning: The value returned by this function isn’t necessarily a whole number.
|
||||||
|
|
||||||
## Example 1
|
## Example 1
|
||||||
|
@ -26,8 +26,5 @@ export interface Office
|
|||||||
| [maxEne](./bitburner.office.maxene.md) | number | Maximum amount of energy of the employees |
|
| [maxEne](./bitburner.office.maxene.md) | number | Maximum amount of energy of the employees |
|
||||||
| [maxHap](./bitburner.office.maxhap.md) | number | Maximum happiness of the employees |
|
| [maxHap](./bitburner.office.maxhap.md) | number | Maximum happiness of the employees |
|
||||||
| [maxMor](./bitburner.office.maxmor.md) | number | Maximum morale of the employees |
|
| [maxMor](./bitburner.office.maxmor.md) | number | Maximum morale of the employees |
|
||||||
| [minEne](./bitburner.office.minene.md) | number | Minimum amount of energy of the employees |
|
|
||||||
| [minHap](./bitburner.office.minhap.md) | number | Minimum happiness of the employees |
|
|
||||||
| [minMor](./bitburner.office.minmor.md) | number | Minimum morale of the employees |
|
|
||||||
| [size](./bitburner.office.size.md) | number | Maximum number of employee |
|
| [size](./bitburner.office.size.md) | number | Maximum number of employee |
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [minEne](./bitburner.office.minene.md)
|
|
||||||
|
|
||||||
## Office.minEne property
|
|
||||||
|
|
||||||
Minimum amount of energy of the employees
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
minEne: number;
|
|
||||||
```
|
|
@ -1,13 +0,0 @@
|
|||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [minHap](./bitburner.office.minhap.md)
|
|
||||||
|
|
||||||
## Office.minHap property
|
|
||||||
|
|
||||||
Minimum happiness of the employees
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
minHap: number;
|
|
||||||
```
|
|
@ -1,13 +0,0 @@
|
|||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [minMor](./bitburner.office.minmor.md)
|
|
||||||
|
|
||||||
## Office.minMor property
|
|
||||||
|
|
||||||
Minimum morale of the employees
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
minMor: number;
|
|
||||||
```
|
|
@ -15,10 +15,6 @@ export class OfficeSpace {
|
|||||||
loc: CityName;
|
loc: CityName;
|
||||||
size: number;
|
size: number;
|
||||||
|
|
||||||
minEne = 5;
|
|
||||||
minHap = 5;
|
|
||||||
minMor = 5;
|
|
||||||
|
|
||||||
maxEne = 100;
|
maxEne = 100;
|
||||||
maxHap = 100;
|
maxHap = 100;
|
||||||
maxMor = 100;
|
maxMor = 100;
|
||||||
@ -141,9 +137,9 @@ export class OfficeSpace {
|
|||||||
this.avgMor = (this.avgMor * perfMult + increase) * this.partyMult;
|
this.avgMor = (this.avgMor * perfMult + increase) * this.partyMult;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.avgEne = Math.max(Math.min(this.avgEne, this.maxEne), this.minEne);
|
this.avgEne = Math.max(Math.min(this.avgEne, this.maxEne), corpConstants.minEmployeeDecay);
|
||||||
this.avgMor = Math.max(Math.min(this.avgMor, this.maxMor), this.minMor);
|
this.avgMor = Math.max(Math.min(this.avgMor, this.maxMor), corpConstants.minEmployeeDecay);
|
||||||
this.avgHap = Math.max(Math.min(this.avgHap, this.maxHap), this.minHap);
|
this.avgHap = Math.max(Math.min(this.avgHap, this.maxHap), corpConstants.minEmployeeDecay);
|
||||||
|
|
||||||
this.coffeePending = false;
|
this.coffeePending = false;
|
||||||
this.partyMult = 1;
|
this.partyMult = 1;
|
||||||
|
@ -118,4 +118,6 @@ export const stateNames: CorpStateName[] = ["START", "PURCHASE", "PRODUCTION", "
|
|||||||
maxProductsBase = 3,
|
maxProductsBase = 3,
|
||||||
fundingRoundShares = [0.1, 0.35, 0.25, 0.2],
|
fundingRoundShares = [0.1, 0.35, 0.25, 0.2],
|
||||||
fundingRoundMultiplier = [4, 3, 3, 2.5],
|
fundingRoundMultiplier = [4, 3, 3, 2.5],
|
||||||
valuationLength = 5;
|
valuationLength = 5,
|
||||||
|
/** Minimum decay value for employee morale/happiness/energy */
|
||||||
|
minEmployeeDecay = 10;
|
||||||
|
@ -675,11 +675,8 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
|||||||
return {
|
return {
|
||||||
loc: office.loc,
|
loc: office.loc,
|
||||||
size: office.size,
|
size: office.size,
|
||||||
minEne: office.minEne,
|
|
||||||
maxEne: office.maxEne,
|
maxEne: office.maxEne,
|
||||||
minHap: office.minHap,
|
|
||||||
maxHap: office.maxHap,
|
maxHap: office.maxHap,
|
||||||
minMor: office.minMor,
|
|
||||||
maxMor: office.maxMor,
|
maxMor: office.maxMor,
|
||||||
employees: office.totalEmployees,
|
employees: office.totalEmployees,
|
||||||
avgEne: office.avgEne,
|
avgEne: office.avgEne,
|
||||||
|
8
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
8
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -7643,6 +7643,8 @@ interface CorpConstants {
|
|||||||
employeeRaiseAmount: number;
|
employeeRaiseAmount: number;
|
||||||
/** Max products for a division without upgrades */
|
/** Max products for a division without upgrades */
|
||||||
maxProductsBase: number;
|
maxProductsBase: number;
|
||||||
|
/** The minimum decay value for happiness/morale/energy */
|
||||||
|
minEmployeeDecay: number;
|
||||||
}
|
}
|
||||||
/** @public */
|
/** @public */
|
||||||
type CorpStateName = "START" | "PURCHASE" | "PRODUCTION" | "SALE" | "EXPORT";
|
type CorpStateName = "START" | "PURCHASE" | "PRODUCTION" | "SALE" | "EXPORT";
|
||||||
@ -7845,16 +7847,10 @@ export interface Office {
|
|||||||
loc: CityName;
|
loc: CityName;
|
||||||
/** Maximum number of employee */
|
/** Maximum number of employee */
|
||||||
size: number;
|
size: number;
|
||||||
/** Minimum amount of energy of the employees */
|
|
||||||
minEne: number;
|
|
||||||
/** Maximum amount of energy of the employees */
|
/** Maximum amount of energy of the employees */
|
||||||
maxEne: number;
|
maxEne: number;
|
||||||
/** Minimum happiness of the employees */
|
|
||||||
minHap: number;
|
|
||||||
/** Maximum happiness of the employees */
|
/** Maximum happiness of the employees */
|
||||||
maxHap: number;
|
maxHap: number;
|
||||||
/** Minimum morale of the employees */
|
|
||||||
minMor: number;
|
|
||||||
/** Maximum morale of the employees */
|
/** Maximum morale of the employees */
|
||||||
maxMor: number;
|
maxMor: number;
|
||||||
/** Amount of employees */
|
/** Amount of employees */
|
||||||
|
Loading…
Reference in New Issue
Block a user