Compare commits

..

91 Commits

Author SHA1 Message Date
hydroflame
e9dfe3c389 v0.47.3 (#808)
* Updated ram cost of documentation

* v0.47.3

Co-authored-by: Samuel A. Lamb <samuei@users.noreply.github.com>
2021-03-07 04:13:37 -05:00
kalobkalob
f9162e4d30 Update ls.rst (#734)
* Update ls.rst

Modified ram cost.

Co-authored-by: hydroflame <79246165+hydroflame@users.noreply.github.com>
2021-03-07 03:10:53 -05:00
danielyxie
b97fab2bf4 Fixed gym bug 2019-07-16 09:52:43 -07:00
danielyxie
3c9ebb75fe Merge pull request #647 from danielyxie/dev
v0.47.2-patch-1
2019-07-16 01:33:35 -07:00
danielyxie
434a522429 Merge branch 'dev' of https://github.com/danielyxie/bitburner into dev 2019-07-16 01:32:02 -07:00
danielyxie
49fa63971b Minor typo fixes for v0.47.2 2019-07-16 01:31:48 -07:00
Kalumniatoris
8dfc563c86 stockmarket.rst typo very -> every
fixed typo: "Stock prices are updated very ~6 seconds." -> "Stock prices are updated every ~6 seconds."
2019-07-16 01:31:47 -07:00
danielyxie
dded9103cb Minor typo fixes for v0.47.2 2019-07-16 01:30:35 -07:00
Kalumniatoris
741f57e9e2 stockmarket.rst typo very -> every
fixed typo: "Stock prices are updated very ~6 seconds." -> "Stock prices are updated every ~6 seconds."
2019-07-15 21:41:03 -07:00
danielyxie
59cf1d5baf v0.47.2 2019-07-15 21:40:43 -07:00
danielyxie
916ef06913 isBusy() now returns true if you are in a hacking mission 2019-07-15 21:40:43 -07:00
danielyxie
91ee65a101 Converted everything to use acorn npm package. Updated acorn packages to latest version. Updated acorn parsing to use ES9 2019-07-15 21:40:43 -07:00
danielyxie
042f926700 Minor bugfixes with killing Netscript scripts, and cleaned up text 2019-07-15 21:40:43 -07:00
danielyxie
c0432359c3 Implemented 'kill by PID' functionality 2019-07-15 21:40:43 -07:00
danielyxie
fbf5545708 Color-coded BitNode selection screen and added SF information 2019-07-15 21:40:43 -07:00
danielyxie
6ae7b0136c Minor bugfixes for a variety of NS functions. After infiltration, UI returns to corp page rather than city page 2019-07-15 21:40:43 -07:00
danielyxie
200ccd3ad0 Renamed getNoSuchRunningScriptErrorMessage() function 2019-07-15 21:40:43 -07:00
danielyxie
31f97f74fd Fix GH Issue #621: workForFaction() now properly accounts for disabled/enabled logs 2019-07-15 21:40:43 -07:00
danielyxie
4cabd2e4ed Implement GH Issue #620: Add tail() Netscript function 2019-07-15 21:40:43 -07:00
danielyxie
8be7fa9157 Implemented GH Issue #599: Added 'solarized dark' theme to CodeMirror 2019-07-15 21:40:43 -07:00
danielyxie
8ddf7dfbd4 Fix GH Issue #616: Stock Market UI throws error for certain locales because the price format length is too high 2019-07-15 21:40:43 -07:00
danielyxie
571ddb109a Fix GH Issue #632: 'Create Program' link visibility should now be properly dynamically evaluated 2019-07-15 21:40:43 -07:00
danielyxie
b2772bbfc1 Fixed GH Issue #641 2019-07-15 21:40:43 -07:00
danielyxie
57815ac6a0 v0.47.2 2019-07-15 21:40:13 -07:00
danielyxie
758f329d14 isBusy() now returns true if you are in a hacking mission 2019-07-13 22:44:53 -07:00
danielyxie
096f984d6b Converted everything to use acorn npm package. Updated acorn packages to latest version. Updated acorn parsing to use ES9 2019-07-13 22:36:12 -07:00
danielyxie
06cd584f10 Minor bugfixes with killing Netscript scripts, and cleaned up text 2019-07-13 20:55:58 -07:00
danielyxie
4f2f75762c Implemented 'kill by PID' functionality 2019-07-11 19:37:17 -07:00
danielyxie
d94516f39b Color-coded BitNode selection screen and added SF information 2019-07-08 18:41:59 -07:00
danielyxie
b479a3570e Minor bugfixes for a variety of NS functions. After infiltration, UI returns to corp page rather than city page 2019-07-08 18:41:59 -07:00
danielyxie
ac49b8074f Renamed getNoSuchRunningScriptErrorMessage() function 2019-07-04 18:14:34 -07:00
danielyxie
7a49a5b3e8 Fix GH Issue #621: workForFaction() now properly accounts for disabled/enabled logs 2019-07-04 18:14:34 -07:00
danielyxie
6d9e6e6466 Implement GH Issue #620: Add tail() Netscript function 2019-07-04 18:14:34 -07:00
danielyxie
2d179199ed Implemented GH Issue #599: Added 'solarized dark' theme to CodeMirror 2019-07-04 18:14:34 -07:00
danielyxie
dc928828e2 Fix GH Issue #616: Stock Market UI throws error for certain locales because the price format length is too high 2019-07-04 18:14:34 -07:00
danielyxie
658df9fb01 Fix GH Issue #632: 'Create Program' link visibility should now be properly dynamically evaluated 2019-07-01 21:15:11 -07:00
danielyxie
44bf3cb101 Fixed GH Issue #641 2019-07-01 20:39:12 -07:00
Papayaman1000
b82d7c12af Removed outdated information
Firefox added flagless support for dynamic imports in version 67, so it no longer needs special mention.
2019-06-28 13:23:24 -07:00
danielyxie
4476d6b258 Merge pull request #642 from danielyxie/dev
Dev
2019-06-28 13:22:53 -07:00
danielyxie
433b399de9 v0.47.1 2019-06-28 09:28:08 -07:00
danielyxie
58d04c0cbb Updated documentation changelog 2019-06-27 00:01:46 -07:00
danielyxie
e3a74f23a1 ps and top Terminal commands now show script pid. Updated version and changelog 2019-06-27 00:01:06 -07:00
danielyxie
3a374de210 killWorkerScript() now takes an optional argument for whether to rerenderUI. This is used to batch UI updates on killall() 2019-06-24 22:48:54 -07:00
danielyxie
4cc6437408 Updated WorkerScript-related code for the workerScripts array->map change 2019-06-24 22:48:54 -07:00
danielyxie
821725cf4d Initial commit for converting workerScripts pool to Map data structure 2019-06-24 22:48:54 -07:00
danielyxie
931de230ae Minor rebalancing to stock market. Updated documentation and tests for recent changes 2019-06-11 00:18:14 -07:00
danielyxie
7301946236 Added and Updated Stock Market tests for the new changes 2019-06-09 21:23:48 -07:00
danielyxie
a15041da75 More rebalancing for stock market changes. Transactions now affect second-order forecast (very slightly) 2019-06-09 15:12:33 -07:00
danielyxie
00f8c0a51f Removed debug stuff for beta branch 2019-06-04 21:31:45 -07:00
danielyxie
63483837bc Fixed version in changelog 2019-06-03 23:10:10 -07:00
danielyxie
dc5f4e6694 Updated documentation for new Stock Market changes. More rebalancing for recent stock market changes 2019-06-03 23:05:25 -07:00
danielyxie
35f8a5115a Finished implementing player influencing on stock 2nd-order forecasts. Balanced recent stock market changes 2019-06-03 22:21:36 -07:00
danielyxie
8398fd47f0 Changed the way stock market cycles occur. Stock second-order forecast now changes normally like before 2019-06-02 23:29:56 -07:00
danielyxie
9d7c869c0a Merge branch 'dev' of https://github.com/danielyxie/bitburner into dev 2019-06-02 20:57:57 -07:00
danielyxie
74587f269e Updated changelog 2019-06-02 20:57:39 -07:00
danielyxie
6a3ffff3ad Merge pull request #630 from jaguilar/ns2_recompile_when_script_write
Recompile scripts when updated via ns.write
2019-06-02 20:56:21 -07:00
J
2f8eac07ee fix indentation 2019-06-02 23:53:07 -04:00
J
3eaefa01f9 Merge branch 'dev' into ns2_recompile_when_script_write 2019-06-02 23:50:57 -04:00
danielyxie
b250af913d Merge pull request #629 from jaguilar/ns2_recompile_stale_deps
recompile ns2 scripts if dependencies change
2019-06-02 20:46:32 -07:00
danielyxie
0b4968d148 Re-added the getStockPurchaseCost() and getStockSaleGain() functions so we don't break user scripts 2019-06-02 20:28:02 -07:00
J
8817d179c6 Merge branch 'dev' into ns2_recompile_stale_deps 2019-06-02 23:03:20 -04:00
James Aguilar
e5e3fec1a9 close dialog boxes on escape 2019-06-02 20:00:14 -07:00
Heikki Aitakangas
eecb0c0f01 Update script.module immediately, so we avoid accidentally evaling the same module several times 2019-06-02 19:58:01 -07:00
James Aguilar
d45689c7df use sequence numbers rather than timestamps for script expiration 2019-06-02 20:26:06 -04:00
James Aguilar
2201dfc371 fix typo 2019-06-02 15:40:13 -04:00
James Aguilar
3ef9042051 fix two cases where markUpdated was not properly called 2019-06-02 15:38:45 -04:00
James Aguilar
1236ad252b markUpdated() for Script 2019-06-02 15:32:35 -04:00
James Aguilar
65331ab22e recompile ns2 scripts if dependencies change 2019-06-02 15:21:08 -04:00
danielyxie
c485fdfa87 Removed stock market price movement. Now only forecast is influenced by big transactions 2019-05-22 19:12:06 -07:00
danielyxie
6effda29a9 Implemented second-order forecasts for stocks 2019-05-22 17:23:30 -07:00
danielyxie
7035154454 Merge branch 'master' of https://github.com/danielyxie/bitburner into dev 2019-05-20 14:45:30 -07:00
danielyxie
d7f3ab9177 Tempered the affect that stock market txs have on stock forecasts 2019-05-20 14:44:51 -07:00
danielyxie
3660dde75f Merge branch 'master' of https://github.com/danielyxie/bitburner into dev 2019-05-19 14:07:16 -07:00
danielyxie
99688b78c7 Temporary rebalancing for v0.47.0 2019-05-19 14:06:53 -07:00
danielyxie
6841f24932 Optimized Largest Prime factor coding contract solver. 2019-05-19 13:56:49 -07:00
Sotisi
9f94d0838a removed faulty else, was left prior by accident. 2019-05-17 15:54:36 -07:00
Sotisi
086fc67ecc Fixed O(n) runtime of "Find Largest Prime Factor" for high primes to 0(sqrt(n)). 2019-05-17 15:54:36 -07:00
danielyxie
a2551f98c2 Fixed documentation typos in v0.47.0 2019-05-17 15:51:28 -07:00
danielyxie
95c928afc9 Merge branch 'dev' of https://github.com/danielyxie/bitburner into dev 2019-05-17 13:51:48 -07:00
danielyxie
8a00e6e532 Merge pull request #614 from danielyxie/active-scripts-ui-and-implementation-rework
Active scripts ui and implementation rework
2019-05-17 13:50:55 -07:00
danielyxie
287a97aea6 Fixed merge conflcits with dev 2019-05-17 13:50:27 -07:00
danielyxie
664267bff0 Removed unused imports in engine 2019-05-17 13:47:35 -07:00
danielyxie
2597b33f81 Finished refactoring augmentations page UI to use react 2019-05-17 13:47:35 -07:00
danielyxie
9442b348e6 Refactored SourceFile-related code to TypeScript 2019-05-17 13:47:35 -07:00
danielyxie
3b7f9c9fb0 Fixed issues with Active Scripts UI. Implemented event emitter for Active Scripts UI 2019-05-17 13:41:16 -07:00
danielyxie
20ca7533b0 Merge pull request #612 from danielyxie/dev
v0.47.0
2019-05-17 13:09:04 -07:00
danielyxie
c1ec3c5eba Finished refactoring Active Scripts UI into React/TypeScript. Currently untested 2019-05-16 23:44:59 -07:00
danielyxie
42804b0cd3 Refactored 'workerScripts' array and killWorkerScript() fn to be their own modules in TypeScript 2019-05-15 23:05:36 -07:00
danielyxie
b1248521f3 Removed unused imports in engine 2019-05-15 00:37:11 -07:00
danielyxie
b744997c72 Finished refactoring augmentations page UI to use react 2019-05-15 00:15:07 -07:00
danielyxie
2d37409392 Refactored SourceFile-related code to TypeScript 2019-05-14 20:56:59 -07:00
250 changed files with 23445 additions and 7807 deletions

126
css/activescripts.scss Normal file
View File

@@ -0,0 +1,126 @@
@import "theme";
.active-scripts-list {
list-style-type: none;
}
#active-scripts-container {
position: fixed;
padding-top: 10px;
> p {
width: 70%;
margin: 6px;
padding: 4px;
}
.accordion-header {
> pre {
color: white;
}
}
}
.active-scripts-server-header {
background-color: #444;
font-size: $defaultFontSize * 1.25;
color: #fff;
margin: 6px 6px 0 6px;
padding: 6px;
cursor: pointer;
width: 60%;
text-align: left;
border: none;
outline: none;
&:after {
content: '\02795'; /* "plus" sign (+) */
font-size: $defaultFontSize * 0.8125;
color: #fff;
float: right;
margin-left: 5px;
}
&.active, &:hover {
background-color: #555;
}
}
.active-scripts-server-header.active {
&:after {
content: "\2796"; /* "minus" sign (-) */
font-size: $defaultFontSize * 0.8125;
color: #fff;
float: right;
margin-left: 5px;
}
&:hover {
background-color: #666;
}
}
.active-scripts-server-panel {
margin: 0 6px 6px 6px;
padding: 0 6px 6px 6px;
width: 55%;
margin-left: 5%;
display: none;
div, ul, ul > li {
background-color: #555;
}
}
.active-scripts-script-header {
background-color: #555;
border: none;
color: var(--my-font-color);
cursor: pointer;
display: block;
outline: none;
padding: 4px 25px 4px 10px;
position: relative;
text-align: left;
width: auto;
&:after {
content: '\02795'; /* "plus" sign (+) */
font-size: $defaultFontSize * 0.8125;
float: right;
margin-left: 5px;
color: transparent;
text-shadow: 0 0 0 var(--my-font-color);
position: absolute;
bottom: 4px;
}
&.active:after {
content: "\2796"; /* "minus" sign (-) */
}
&:hover,
&.active:hover {
background-color: #666;
}
&.active {
background-color: #555;
}
}
.active-scripts-script-panel {
background-color: #555;
display: none;
font-size: 14px;
margin-bottom: 6px;
padding: 0 18px;
width: auto;
pre, h2, ul, li {
background-color: #555;
width: auto;
color: #fff;
margin-left: 5%;
}
}

31
css/augmentations.scss Normal file
View File

@@ -0,0 +1,31 @@
/**
* Styling for the Augmentations UI. This is the page that displays all of the
* player's owned and purchased Augmentations and Source-Files. It also allows
* the player to install Augmentations
*/
@import "theme";
#augmentations-container {
position: fixed;
padding-top: 10px;
}
#augmentations-content {
> p {
font-size: $defaultFontSize * 0.875;
width: 70%;
}
}
.augmentations-list {
button,
div {
color: var(--my-font-color);
text-decoration: none;
}
button {
padding: 4px;
}
}

View File

@@ -18,126 +18,6 @@
position: fixed;
}
/* Active scripts */
.active-scripts-list {
list-style-type: none;
}
#active-scripts-container {
position: fixed;
padding-top: 10px;
}
#active-scripts-text,
#active-scripts-total-prod {
width: 70%;
margin: 6px;
padding: 4px;
}
.active-scripts-server-header {
background-color: #444;
font-size: $defaultFontSize * 1.25;
color: #fff;
margin: 6px 6px 0 6px;
padding: 6px;
cursor: pointer;
width: 60%;
text-align: left;
border: none;
outline: none;
}
.active-scripts-server-header.active,
.active-scripts-server-header:hover {
background-color: #555;
}
.active-scripts-server-header.active:hover {
background-color: #666;
}
.active-scripts-server-header:after {
content: '\02795'; /* "plus" sign (+) */
font-size: $defaultFontSize * 0.8125;
color: #fff;
float: right;
margin-left: 5px;
}
.active-scripts-server-header.active:after {
content: "\2796"; /* "minus" sign (-) */
font-size: $defaultFontSize * 0.8125;
color: #fff;
float: right;
margin-left: 5px;
}
.active-scripts-server-panel {
margin: 0 6px 6px 6px;
padding: 0 6px 6px 6px;
width: 55%;
margin-left: 5%;
display: none;
}
.active-scripts-server-panel div,
.active-scripts-server-panel ul,
.active-scripts-server-panel ul > li {
background-color: #555;
}
.active-scripts-script-header {
background-color: #555;
color: var(--my-font-color);
padding: 4px 25px 4px 10px;
cursor: pointer;
width: auto;
text-align: left;
border: none;
outline: none;
position: relative;
&:after {
content: '\02795'; /* "plus" sign (+) */
font-size: $defaultFontSize * 0.8125;
float: right;
margin-left: 5px;
color: transparent;
text-shadow: 0 0 0 var(--my-font-color);
position: absolute;
bottom: 4px;
}
&.active:after {
content: "\2796"; /* "minus" sign (-) */
}
&:hover,
&.active:hover {
background-color: #666;
}
&.active {
background-color: #555;
}
}
.active-scripts-script-panel {
padding: 0 18px;
background-color: #555;
width: auto;
display: none;
margin-bottom: 6px;
p, h2, ul, li {
background-color: #555;
width: auto;
color: #fff;
margin-left: 5%;
}
}
/* World */
#world-container {
position: fixed;
@@ -185,19 +65,6 @@
width: 70%;
}
#faction-donate-amount-txt,
#faction-donate-input {
padding: 6px;
margin: 6px;
display: inline-block;
color: var(--my-font-color);
background-color: #000;
}
#faction-donate-amount-txt {
width: 50%;
}
#faction-container p,
#faction-container pre {
padding: 4px 6px;
@@ -213,45 +80,12 @@
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/* Faction Augmentations */
#faction-augmentations-container {
position: fixed;
padding-top: 10px;
p, a, ul, h1 {
margin: 8px;
padding: 4px;
}
}
/* World */
#world-container li {
margin: 0 0 15px 0;
list-style-type: none;
}
/* Augmentations */
#augmentations-container {
position: fixed;
padding-top: 10px;
}
.augmentations-list {
button,
div {
color: var(--my-font-color);
text-decoration: none;
}
button {
padding: 2px 5px;
}
div {
padding: 6px;
}
}
/* Tutorial */
#tutorial-container {
position: fixed;

View File

@@ -7,16 +7,28 @@
position: fixed;
}
.bitnode {
color: #00f;
}
&.level-0 {
color: red;
}
.bitnode-destroyed {
color: #f00;
}
&.level-1 {
color: yellow;
}
.bitnode:hover,
.bitnode-destroyed:hover {
color: #fff;
&.level-2 {
color: #48D1CC;
}
&.level-3 {
color: blue;
}
&.unimplemented {
color: gray;
}
&:hover {
color: #fff;
}
}

View File

@@ -243,8 +243,8 @@ a:visited {
/* Accordion menus (Header with collapsible panel) */
.accordion-header {
background-color: #444;
font-size: $defaultFontSize * 1.25;
color: #fff;
font-size: $defaultFontSize * 1.25;
margin: 6px 6px 0 6px;
padding: 4px 6px;
cursor: pointer;

20
dist/engine.bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={1:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var a=c;u.push([353,0]),o()}({300:function(n,t,o){},302:function(n,t,o){},304:function(n,t,o){},306:function(n,t,o){},308:function(n,t,o){},310:function(n,t,o){},312:function(n,t,o){},314:function(n,t,o){},316:function(n,t,o){},318:function(n,t,o){},320:function(n,t,o){},322:function(n,t,o){},324:function(n,t,o){},326:function(n,t,o){},328:function(n,t,o){},330:function(n,t,o){},332:function(n,t,o){},334:function(n,t,o){},336:function(n,t,o){},338:function(n,t,o){},340:function(n,t,o){},342:function(n,t,o){},344:function(n,t,o){},346:function(n,t,o){},348:function(n,t,o){},350:function(n,t,o){},353:function(n,t,o){"use strict";o.r(t);o(352),o(350),o(348),o(346),o(344),o(342),o(340),o(338),o(336),o(334),o(332),o(330),o(328),o(326),o(324),o(322),o(320),o(318),o(316),o(314),o(312),o(310),o(308),o(306),o(304),o(302),o(300)}});
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var a=c;r.push([362,0]),o()}({305:function(n,t,o){},307:function(n,t,o){},309:function(n,t,o){},311:function(n,t,o){},313:function(n,t,o){},315:function(n,t,o){},317:function(n,t,o){},319:function(n,t,o){},321:function(n,t,o){},323:function(n,t,o){},325:function(n,t,o){},327:function(n,t,o){},329:function(n,t,o){},331:function(n,t,o){},333:function(n,t,o){},335:function(n,t,o){},337:function(n,t,o){},339:function(n,t,o){},341:function(n,t,o){},343:function(n,t,o){},345:function(n,t,o){},347:function(n,t,o){},349:function(n,t,o){},351:function(n,t,o){},353:function(n,t,o){},355:function(n,t,o){},357:function(n,t,o){},359:function(n,t,o){},362:function(n,t,o){"use strict";o.r(t);o(361),o(359),o(357),o(355),o(353),o(351),o(349),o(347),o(345),o(343),o(341),o(339),o(337),o(335),o(333),o(331),o(329),o(327),o(325),o(323),o(321),o(319),o(317),o(315),o(313),o(311),o(309),o(307),o(305)}});
//# sourceMappingURL=engineStyle.bundle.js.map

279
dist/engineStyle.css vendored
View File

@@ -261,8 +261,8 @@ a:visited {
/* Accordion menus (Header with collapsible panel) */
.accordion-header {
background-color: #444;
font-size: 20px;
color: #fff;
font-size: 20px;
margin: 6px 6px 0 6px;
padding: 4px 6px;
cursor: pointer;
@@ -933,6 +933,104 @@ button {
height: 30px;
margin-left: 6px; }
/* COLORS */
/* Attributes */
.active-scripts-list {
list-style-type: none; }
#active-scripts-container {
position: fixed;
padding-top: 10px; }
#active-scripts-container > p {
width: 70%;
margin: 6px;
padding: 4px; }
#active-scripts-container .accordion-header > pre {
color: white; }
.active-scripts-server-header {
background-color: #444;
font-size: 20px;
color: #fff;
margin: 6px 6px 0 6px;
padding: 6px;
cursor: pointer;
width: 60%;
text-align: left;
border: none;
outline: none; }
.active-scripts-server-header:after {
content: '\2795';
/* "plus" sign (+) */
font-size: 13px;
color: #fff;
float: right;
margin-left: 5px; }
.active-scripts-server-header.active, .active-scripts-server-header:hover {
background-color: #555; }
.active-scripts-server-header.active:after {
content: "\2796";
/* "minus" sign (-) */
font-size: 13px;
color: #fff;
float: right;
margin-left: 5px; }
.active-scripts-server-header.active:hover {
background-color: #666; }
.active-scripts-server-panel {
margin: 0 6px 6px 6px;
padding: 0 6px 6px 6px;
width: 55%;
margin-left: 5%;
display: none; }
.active-scripts-server-panel div, .active-scripts-server-panel ul, .active-scripts-server-panel ul > li {
background-color: #555; }
.active-scripts-script-header {
background-color: #555;
border: none;
color: var(--my-font-color);
cursor: pointer;
display: block;
outline: none;
padding: 4px 25px 4px 10px;
position: relative;
text-align: left;
width: auto; }
.active-scripts-script-header:after {
content: '\2795';
/* "plus" sign (+) */
font-size: 13px;
float: right;
margin-left: 5px;
color: transparent;
text-shadow: 0 0 0 var(--my-font-color);
position: absolute;
bottom: 4px; }
.active-scripts-script-header.active:after {
content: "\2796";
/* "minus" sign (-) */ }
.active-scripts-script-header:hover, .active-scripts-script-header.active:hover {
background-color: #666; }
.active-scripts-script-header.active {
background-color: #555; }
.active-scripts-script-panel {
background-color: #555;
display: none;
font-size: 14px;
margin-bottom: 6px;
padding: 0 18px;
width: auto; }
.active-scripts-script-panel pre, .active-scripts-script-panel h2, .active-scripts-script-panel ul, .active-scripts-script-panel li {
background-color: #555;
width: auto;
color: #fff;
margin-left: 5%; }
/* COLORS */
/* Attributes */
/**
@@ -1007,107 +1105,6 @@ button {
padding-top: 10px;
position: fixed; }
/* Active scripts */
.active-scripts-list {
list-style-type: none; }
#active-scripts-container {
position: fixed;
padding-top: 10px; }
#active-scripts-text,
#active-scripts-total-prod {
width: 70%;
margin: 6px;
padding: 4px; }
.active-scripts-server-header {
background-color: #444;
font-size: 20px;
color: #fff;
margin: 6px 6px 0 6px;
padding: 6px;
cursor: pointer;
width: 60%;
text-align: left;
border: none;
outline: none; }
.active-scripts-server-header.active,
.active-scripts-server-header:hover {
background-color: #555; }
.active-scripts-server-header.active:hover {
background-color: #666; }
.active-scripts-server-header:after {
content: '\2795';
/* "plus" sign (+) */
font-size: 13px;
color: #fff;
float: right;
margin-left: 5px; }
.active-scripts-server-header.active:after {
content: "\2796";
/* "minus" sign (-) */
font-size: 13px;
color: #fff;
float: right;
margin-left: 5px; }
.active-scripts-server-panel {
margin: 0 6px 6px 6px;
padding: 0 6px 6px 6px;
width: 55%;
margin-left: 5%;
display: none; }
.active-scripts-server-panel div,
.active-scripts-server-panel ul,
.active-scripts-server-panel ul > li {
background-color: #555; }
.active-scripts-script-header {
background-color: #555;
color: var(--my-font-color);
padding: 4px 25px 4px 10px;
cursor: pointer;
width: auto;
text-align: left;
border: none;
outline: none;
position: relative; }
.active-scripts-script-header:after {
content: '\2795';
/* "plus" sign (+) */
font-size: 13px;
float: right;
margin-left: 5px;
color: transparent;
text-shadow: 0 0 0 var(--my-font-color);
position: absolute;
bottom: 4px; }
.active-scripts-script-header.active:after {
content: "\2796";
/* "minus" sign (-) */ }
.active-scripts-script-header:hover, .active-scripts-script-header.active:hover {
background-color: #666; }
.active-scripts-script-header.active {
background-color: #555; }
.active-scripts-script-panel {
padding: 0 18px;
background-color: #555;
width: auto;
display: none;
margin-bottom: 6px; }
.active-scripts-script-panel p, .active-scripts-script-panel h2, .active-scripts-script-panel ul, .active-scripts-script-panel li {
background-color: #555;
width: auto;
color: #fff;
margin-left: 5%; }
/* World */
#world-container {
position: fixed;
@@ -1147,17 +1144,6 @@ button {
margin: 6px;
width: 70%; }
#faction-donate-amount-txt,
#faction-donate-input {
padding: 6px;
margin: 6px;
display: inline-block;
color: var(--my-font-color);
background-color: #000; }
#faction-donate-amount-txt {
width: 50%; }
#faction-container p,
#faction-container pre {
padding: 4px 6px;
@@ -1176,35 +1162,11 @@ button {
word-wrap: break-word;
/* Internet Explorer 5.5+ */ }
/* Faction Augmentations */
#faction-augmentations-container {
position: fixed;
padding-top: 10px; }
#faction-augmentations-container p, #faction-augmentations-container a, #faction-augmentations-container ul, #faction-augmentations-container h1 {
margin: 8px;
padding: 4px; }
/* World */
#world-container li {
margin: 0 0 15px 0;
list-style-type: none; }
/* Augmentations */
#augmentations-container {
position: fixed;
padding-top: 10px; }
.augmentations-list button,
.augmentations-list div {
color: var(--my-font-color);
text-decoration: none; }
.augmentations-list button {
padding: 2px 5px; }
.augmentations-list div {
padding: 6px; }
/* Tutorial */
#tutorial-container {
position: fixed;
@@ -1286,6 +1248,29 @@ button {
display: inline;
width: 25%; }
/**
* Styling for the Augmentations UI. This is the page that displays all of the
* player's owned and purchased Augmentations and Source-Files. It also allows
* the player to install Augmentations
*/
/* COLORS */
/* Attributes */
#augmentations-container {
position: fixed;
padding-top: 10px; }
#augmentations-content > p {
font-size: 14px;
width: 70%; }
.augmentations-list button,
.augmentations-list div {
color: var(--my-font-color);
text-decoration: none; }
.augmentations-list button {
padding: 4px; }
/* COLORS */
/* Attributes */
/**
@@ -1294,14 +1279,22 @@ button {
#red-pill-container {
position: fixed; }
.bitnode {
color: #00f; }
.bitnode.level-0 {
color: red; }
.bitnode-destroyed {
color: #f00; }
.bitnode.level-1 {
color: yellow; }
.bitnode:hover,
.bitnode-destroyed:hover {
.bitnode.level-2 {
color: #48D1CC; }
.bitnode.level-3 {
color: blue; }
.bitnode.unimplemented {
color: gray; }
.bitnode:hover {
color: #fff; }
/* COLORS */

26
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -204,8 +204,8 @@ The list contains the name of (i.e. the value returned by
| | | the string, the result should be an array with only an empty string. |
| | | |
| | | Examples: |
| | | ()())() -> ["()()()", "(())()"] |
| | | (a)())() -> ["(a)()()", "(a())()"] |
| | | ()())() -> [()()(), (())()] |
| | | (a)())() -> [(a)()(), (a())()] |
| | | )( -> [""] |
+------------------------------------+------------------------------------------------------------------------------------------+
| Find All Valid Math Expressions | | You are given a string which contains only digits between 0 and 9 as well as a target |
@@ -214,10 +214,12 @@ The list contains the name of (i.e. the value returned by
| | | |
| | | The answer should be provided as an array of strings containing the valid expressions. |
| | | |
| | | NOTE: Numbers in an expression cannot have leading 0's |
| | | |
| | | Examples: |
| | | Input: digits = "123", target = 6 |
| | | Output: ["1+2+3", "1*2*3"] |
| | | Output: [1+2+3, 1*2*3] |
| | | |
| | | Input: digits = "105", target = 5 |
| | | Output: ["1*0+5", "10-5"] |
| | | Output: [1*0+5, 10-5] |
+------------------------------------+------------------------------------------------------------------------------------------+

View File

@@ -28,6 +28,27 @@ a stock.
.. note:: Shorting stocks is not available immediately, and must be unlocked later in the
game.
Forecast & Second-Order Forecast
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A stock's forecast is its likelihood of increasing or decreasing in value. The
forecast is typically represented by its probability of increasing in either
a decimal or percentage form. For example, a forecast of 70% means the stock
has a 70% chance of increasing and a 30% chance of decreasing.
A stock's second-order forecast is the target value that its forecast trends towards.
For example, if a stock has a forecast of 60% and a second-order forecast of 70%,
then the stock's forecast should slowly trend towards 70% over time. However, this is
determined by RNG so there is a chance that it may never reach 70%.
Both the forecast and the second-order forecast change over time.
A stock's forecast can be viewed after purchasing Four Sigma (4S) Market Data
access. This lets you see the forecast info on the Stock Market UI. If you also
purchase access to the 4S Market Data TIX API, then you can view a stock's forecast
using the :js:func:`getStockForecast` function.
A stock's second-order forecast is always hidden.
.. _gameplay_stock_market_spread:
Spread (Bid Price & Ask Price)
@@ -51,38 +72,16 @@ bid price. Note that this is reversed for a short position. Purchasing a stock
in the short position will occur at the stock's bid price, and selling a stock
in the short position will occur at the stock's ask price.
.. _gameplay_stock_market_spread_price_movement:
Transactions Influencing Stock Price
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Buying or selling a large number of shares of a stock will influence that stock's price.
Buying a stock in the long position will cause that stock's price to
increase. Selling a stock in the long position will cause the stock's price to decrease.
The reverse occurs for the short position. The effect of this depends on how many shares
are being transacted. More shares will have a bigger effect on the stock price. If
only a small number of shares are being transacted, the stock price may not be affected.
Note that this "influencing" of the stock price **can happen in the middle of a transaction**.
For example, assume you are selling 1m shares of a stock. That stock's bid price
is currently $100. However, selling 100k shares of the stock causes its price to drop
by 1%. This means that for your transaction of 1m shares, the first 100k shares will be
sold at $100. Then the next 100k shares will be sold at $99. Then the next 100k shares will
be sold at $98.01, and so on.
This is an important concept to keep in mind if you are trying to purchase/sell a
large number of shares, as **it can negatively affect your profits**.
.. note:: On the Stock Market UI, the displayed profit of a position does not take
this "influencing" into account.
Transactions Influencing Stock Forecast
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In addition to influencing stock price, buying or selling a large number of shares
of a stock will also influence that stock's "forecast". The forecast is the likelihood
that the stock will increase or decrease in price. The magnitude of this effect depends
on the number of shares being transacted. More shares will have a bigger effect on the
stock forecast.
Buying or selling a large number of shares
of a stock will influence that stock's forecast & second-order forecast.
The forecast is the likelihood that the stock will increase or decrease in price.
The magnitude of this effect depends on the number of shares being transacted.
More shares will have a bigger effect.
The effect that transactions have on a stock's second-order forecast is
significantly smaller than the effect on its forecast.
.. _gameplay_stock_market_order_types:
@@ -134,15 +133,49 @@ A Stop Order to buy will execute if the stock's price <= order's price
A Stop Order to sell will execute if the stock's price >= order's price.
.. note:: Stop Orders do **not** take into account the fact that transactions can
influence a stock's price. Limit Orders, however, do take this into account.
.. _gameplay_stock_market_player_actions_influencing_stock:
For example, assume you have a Limit Order set to purchase a stock at
$5. Then, the stock's price drops to $5 and your Limit Order executes.
However, the transaction causes the stock's price to increase before
the order finishes executing all of the shares. Your Limit Order will
stop executing, and will continue only when the stock's price drops back to
$5 or below.
Player Actions Influencing Stocks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is possible for your actions elsewhere in the game to influence the stock market.
Hacking
If a server has a corresponding stock (e.g. *foodnstuff* server -> FoodNStuff
stock), then hacking that server can decrease the stock's second-order
forecast. This causes the corresponding stock's forecast to trend downwards in value
over time.
This effect only occurs if you set the *stock* option to
true when calling the :js:func:`hack` function. The chance that hacking a
server will cause this effect is based on what percentage of the
server's total money you steal.
A single hack will have a minor
effect, but continuously hacking a server for lots of money over time
will have a noticeable effect in making the stock's forecast trend downwards.
Growing
If a server has a corresponding stock (e.g. *foodnstuff* server -> FoodNStuff
stock), then growing that server's money can increase the stock's
second-order forecast. This causes the corresponding stock's
forecast to trend upwards in value over time.
This effect only occurs if you set the *stock* option to true when calling the
:js:func:`grow` function. The chance that growing a server will cause this
effect is based on what percentage of the server's total money to add to it.
A single grow operation will have a minor effect, but continuously growing
a server for lots of money over time will have a noticeable effect in making
the stock's forecast trend upwards.
Working for a Company
If a company has a corresponding stock, then working for that company will
increase the corresponding stock's second-order forecast. This will
cause the stock's forecast to (slowly) trend upwards in value
over time.
The potency of this effect is based on how "effective" you are when you work
(i.e. its based on your stats and multipliers).
Automating the Stock Market
---------------------------
@@ -151,7 +184,7 @@ See :ref:`netscript_tixapi` for more details.
Under the Hood
--------------
Stock prices are updated very ~6 seconds.
Stock prices are updated every ~6 seconds.
Whether a stock's price moves up or down is determined by RNG. However,
stocks have properties that can influence the way their price moves. These properties
@@ -159,7 +192,8 @@ are hidden, although some of them can be made visible by purchasing the
Four Sigma (4S) Market Data upgrade. Some examples of these properties are:
* Volatility
* Likelihood of increasing or decreasing
* Likelihood of increasing or decreasing (i.e. the stock's forecast)
* Likelihood of forecast increasing or decreasing (i.e. the stock's second-order forecast)
* How easily a stock's price/forecast is influenced by transactions
* Spread percentage
* Maximum price (not a real maximum, more of a "soft cap")

View File

@@ -312,9 +312,12 @@ kill
^^^^
$ kill [script name] [args...]
$ kill [pid]
Kill the script specified by the script name and arguments. Each argument must
be separated by a space. Remember that a running script is uniquely identified
Kill the script specified by the script filename and arguments OR by its PID.
If you are killing the script using its filename and arguments, then each argument
must be separated by a space. Remember that a running script is uniquely identified
by both its name and the arguments that are used to start it. So, if a script
was ran with the following arguments::
@@ -324,8 +327,7 @@ Then to kill this script the same arguments would have to be used::
$ kill foo.script 50e3 sigma-cosmetics
Note that after issuing the 'kill' command for a script, it may take a few seconds for
the script to actually stop running.
If you are killing the script using its PID, then the PID argument must be numeric.
killall
^^^^^^^
@@ -403,7 +405,7 @@ to convert from script to text file, or vice versa.
This function can also be used to rename files.
.. note:: Unlike the Linux :code:`mv` command, the *destination* argument must be the
full filepath. It cannot be a directory.
full filepath. It cannot be a directory.
Examples::
@@ -511,6 +513,8 @@ sudov
Prints whether or not you have root access to the current server.
.. _tail_terminal_command:
tail
^^^^
@@ -584,7 +588,7 @@ The data can only be downloaded to a script (.script, .ns, .js) or a text file
(.txt). If the target file already exists, it will be overwritten by this command.
Note that will not be possible to download data from many websites because they
do not allow cross-origin origin sharing (CORS). This includes websites such
do not allow cross-origin resource sharing (CORS). This includes websites such
as gist and pastebin. One notable site it will work on is rawgithub. Example::
$ wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt

View File

@@ -3,6 +3,54 @@
Changelog
=========
v0.47.2 - 7/15/2019
-------------------
**Netscript Changes**
* Added tail() Netscript function
* hacknet.getNodeStats() function now returns an additional property for Hacknet Servers: hashCapacity
* When writing to a file, the write() function now casts the data being written to a string (using String())
* BitNode-selection page now shows what Source-File level you have for each BitNode
* Overloaded kill() function so that you can kill a script by its PID
* spawn() now only takes 10 seconds to run (decreased from 20 seconds)
* run() and exec() now return the PID of the newly-executed scripts, rather than a boolean
* (A PID is just a positive integer)
* run(), exec(), and spawn() no longer need to be await-ed in NetscriptJS
* Script parsing and RAM calculations now support ES9
* installAugmentations() no longer has a return value since it causes all scripts to die
* isBusy() now returns true if you are in a Hacking Mission
* Bug fix: workForFaction() function now properly accounts for disabled logs
* Bug fix: RAM should now be properly calculated when running a callback script with installAugmentations()
* Bug fix: Fixed bug that caused scripts killed by exit()/spawn() to "clean up" twice
**Misc Changes**
* The 'kill' Terminal command can now kill a script by its PID
* Added 'Solarized Dark' theme to CodeMirror editor
* After Infiltration, you will now return to the company page rather than the city page
* Bug fix: Stock Market UI should no longer crash for certain locale settings
* Bug fix: You can now properly remove unfinished programs (the *.exe-N%-INC files)
* Bug fix: Fixed an issue that allowed you to increase money on servers with a 'maxMoney' of 0 (like CSEC)
* Bug fix: Scripts no longer persist if they were started with syntax/import errors
* Bug fix: 'hack' and 'analyze' Terminal commands are now blocking
* Bug fix: Exp earned by duplicate sleeves at universities/gyms now takes hash upgrades into account
v0.47.1 - 6/27/2019
-------------------
* Stock Market changes:
* Transactions no longer influence stock prices (but they still influence forecast)
* Changed the way stocks behave, particularly with regard to how the stock forecast occasionally "flips"
* Hacking & growing a server can potentially affect the way the corresponding stock's forecast changes
* Working for a company positively affects the way the corresponding stock's forecast changes
* Scripts now start/stop instantly
* Improved performance when starting up many copies of a new NetscriptJS script (by Ornedan)
* Improved performance when killing scripts
* Dialog boxes can now be closed with the ESC key (by jaguilar)
* NetscriptJS scripts should now be "re-compiled" if their dependencies change (by jaguilar)
* write() function should now properly cause NetscriptJS scripts to "re-compile" (by jaguilar)
v0.47.0 - 5/17/2019
-------------------
* Stock Market changes:

View File

@@ -18,3 +18,5 @@ getBitNodeMultipliers() Netscript Function
mults = getBitNodeMultipliers();
print(mults.ServerMaxMoney);
print(mults.HackExpGain);
:RAM cost: 4 GB

View File

@@ -4,7 +4,7 @@ brutessh() Netscript Function
.. js:function:: brutessh(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.

View File

@@ -6,7 +6,7 @@ clear() Netscript Function
:param string/number port/fn: Port or text file to clear
:RAM cost: 1 GB
This function is used to clear data in a `Netscript Ports <http://bitburner.wikia.com/wiki/Netscript_Ports>`_ or a text file.
This function is used to clear data in a :ref:`Netscript Port <netscript_ports>` or a text file.
If the *port/fn* argument is a number between 1 and 20, then it specifies a port and will clear it (deleting all data from the underlying queue).

View File

@@ -14,10 +14,15 @@ exec() Netscript Function
Run a script as a separate process on a specified server. This is similar to the *run* function except
that it can be used to run a script on any server, instead of just the current server.
Returns true if the script is successfully started, and false otherwise.
If the script was successfully started, then this functions returns the PID
of that script. Otherwise, it returns 0.
Running this function with a *numThreads* argument of 0 will return false without running the script.
However, running this function with a negative *numThreads* argument will cause a runtime error.
.. note:: PID stands for Process ID. The PID is a unique identifier for each script.
The PID will always be a positive integer.
.. warning:: 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.
The simplest way to use the *exec* command is to call it with just the script name and the target server.
The following example will try to run *generic-hack.script* on the *foodnstuff* server::

View File

@@ -4,7 +4,7 @@ ftpcrack() Netscript Function
.. js:function:: ftpcrack(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.

View File

@@ -11,3 +11,6 @@ getGrowTime() Netscript Function
The function takes in an optional *hackLvl* parameter that can be specified
to see what the grow time would be at different hacking levels.
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
return :code:`Infinity`.

View File

@@ -11,3 +11,6 @@ getHackTime() Netscript Function
The function takes in an optional *hackLvl* parameter that can be specified
to see what the hack time would be at different hacking levels.
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
return :code:`Infinity`.

View File

@@ -11,3 +11,6 @@ getWeakenTime() Netscript Function
The function takes in an optional *hackLvl* parameter that can be specified
to see what the weaken time would be at different hacking levels.
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
return :code:`Infinity`.

View File

@@ -8,6 +8,8 @@ grow() Netscript Function
* threads (*number*) - Number of threads to use for this function.
Must be less than or equal to the number of threads the script is running with.
* stock (*boolean*) - If true, the function can affect the stock market. See
:ref:`gameplay_stock_market_player_actions_influencing_stock`
:returns: The number by which the money on the server was multiplied for the growth
:RAM cost: 0.15 GB

View File

@@ -4,7 +4,7 @@ growthAnalyze() Netscript Function
.. js:function:: growthAnalyze(hostname/ip, growthAmount)
:param string hostname/ip: IP or hostname of server to analyze
:param number growthAmount: Multiplicative factor by which the server is grown. Decimal form.
:param number growthAmount: Multiplicative factor by which the server is grown. Decimal form. Must be >= 1.
:returns: The amount of grow() calls needed to grow the specified server by the specified amount
:RAM cost: 1 GB

View File

@@ -8,6 +8,8 @@ hack() Netscript Function
* threads (*number*) - Number of threads to use for this function.
Must be less than or equal to the number of threads the script is running with.
* stock (*boolean*) - If true, the function can affect the stock market. See
:ref:`gameplay_stock_market_player_actions_influencing_stock`
:returns: The amount of money stolen if the hack is successful, and zero otherwise
:RAM cost: 0.1 GB

View File

@@ -4,7 +4,7 @@ httpworm() Netscript Function
.. js:function:: httpworm(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.

View File

@@ -27,3 +27,22 @@ kill() Netscript Function
The following will try to kill a script named *foo.script* on the current server that was ran with the arguments 1 and "foodnstuff"::
kill("foo.script", getHostname(), 1, "foodnstuff");
.. js:function:: kill(scriptPid)
:param number scriptPid: PID of the script to kill
:RAM cost: 0.5 GB
Kills the script with the specified PID. Killing a script by its PID will typically
have better performance, especially if you have many scripts running.
If this function successfully kills the specified script, then it will return true.
Otherwise, it will return false.
*Examples:*
The following example will try to kill the script with the PID 10::
if (kill(10)) {
print("Killed script with PID 10!");
}

View File

@@ -5,7 +5,7 @@ ls() Netscript Function
:param string hostname/ip: Hostname or IP of the target server
:param string grep: a substring to search for in the filename
:RAM cost: 0 GB
:RAM cost: 0.2 GB
Returns an array with the filenames of all files on the specified server (as strings). The returned array
is sorted in alphabetic order

View File

@@ -5,6 +5,7 @@ nFormat() Netscript Function
:param number n: Number to format
:param string format: Formatter
:RAM cost: 0 GB
Converts a number into a string with the specified formatter. This uses the
`numeraljs <http://numeraljs.com/>`_ library, so the formatters must be compatible

View File

@@ -4,7 +4,7 @@ nuke() Netscript Function
.. js:function:: nuke(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.

View File

@@ -4,7 +4,7 @@ relaysmtp() Netscript Function
.. js:function:: relaysmtp(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.

View File

@@ -13,10 +13,15 @@ run() Netscript Function
Run a script as a separate process. This function can only be used to run scripts located on the current server (the server
running the script that calls this function).
Returns true if the script is successfully started, and false otherwise.
If the script was successfully started, then this functions returns the PID
of that script. Otherwise, it returns 0.
Running this function with a *numThreads* argument of 0 will return false without running the script.
However, running this function with a negative *numThreads* argument will cause a runtime error.
.. note:: PID stands for Process ID. The PID is a unique identifier for each script.
The PID will always be a positive integer.
.. warning:: 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.
The simplest way to use the *run* command is to call it with just the script name. The following example will run
'foo.script' single-threaded with no arguments::

View File

@@ -9,7 +9,7 @@ spawn() Netscript Function
Additional arguments to pass into the new script that is being run.
:RAM cost: 2 GB
Terminates the current script, and then after a delay of about 20 seconds it will execute the newly-specified script.
Terminates the current script, and then after a delay of about 10 seconds it will execute the newly-specified script.
The purpose of this function is to execute a new script without being constrained by the RAM usage of the current one.
This function can only be used to run scripts on the local server.

View File

@@ -4,7 +4,7 @@ sqlinject() Netscript Function
.. js:function:: sqlinject(hostname/ip)
:param string hostname/ip: IP or hostname of the target server
:RAM cost: 0 GB
:RAM cost: 0.05 GB
Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.

View File

@@ -0,0 +1,29 @@
tail() Netscript Function
==================================
.. js:function:: tail([fn], [hostname/ip=current ip], [...args])
:param string fn: Optional. Filename of script to get logs from.
:param string ip: Optional. IP or hostname of the server that the script is on
:param args...: Arguments to identify which scripts to get logs for
:RAM cost: 0 GB
Opens a script's logs. This is functionally the same as the
:ref:`tail_terminal_command` Terminal command.
If the function is called with no arguments, it will open the current script's logs.
Otherwise, the `fn`, `hostname/ip,` and `args...` arguments can be used to get the logs
from another script. Remember that scripts are uniquely identified by both
their names and arguments.
Examples::
// Open logs from foo.script on the current server that was run with no args
tail("foo.script");
// Open logs from foo.script on the foodnstuff server that was run with no args
tail("foo.script", "foodnstuff");
// Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]
tail("foo.script", "foodnstuff", 1, "test");

View File

@@ -2,6 +2,7 @@ getActionAutolevel() Netscript Function
=======================================
.. js:function:: getActionAutolevel(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionCountRemaining() Netscript Function
============================================
.. js:function:: getActionCountRemaining(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionCurrentLevel() Netscript Function
==========================================
.. js:function:: getActionCurrentLevel(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionEstimatedSuccessChance() Netscript Function
====================================================
.. js:function:: getActionEstimatedSuccessChance(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionMaxLevel() Netscript Function
======================================
.. js:function:: getActionMaxLevel(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionRepGain() Netscript Function
=====================================
.. js:function:: getActionRepGain(type, name[, level=current level])
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ getActionTime() Netscript Function
==================================
.. js:function:: getActionTime(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,5 +2,6 @@ getBlackOpNames() Netscript Function
====================================
.. js:function:: getBlackOpNames()
:RAM cost: 0.4 GB
Returns an array of strings containing the names of all Bladeburner Black Ops

View File

@@ -2,6 +2,7 @@ getBlackOpRank() Netscript Function
====================================
.. js:function:: getBlackOpRank(name)
:RAM cost: 2 GB
:param string name: name of the BlackOp. Must be an exact match.

View File

@@ -2,6 +2,7 @@ getBonusTime() Netscript Function
=================================
.. js:function:: getBonusTime()
:RAM cost: 0 GB
Returns the amount of accumulated "bonus time" (seconds) for the Bladeburner mechanic.

View File

@@ -2,5 +2,6 @@ getCity() Netscript Function
============================
.. js:function:: getCity()
:RAM cost: 4 GB
Returns the city that the player is currently in (for Bladeburner).

View File

@@ -2,6 +2,7 @@ getCityChaos() Netscript Function
=================================
.. js:function:: getCityChaos(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city. Case-sensitive

View File

@@ -2,6 +2,7 @@ getCityEstimatedCommunities() Netscript Function
================================================
.. js:function:: getCityEstimatedCommunities(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city. Case-sensitive

View File

@@ -2,6 +2,7 @@ getCityEstimatedPopulation() Netscript Function
===============================================
.. js:function:: getCityEstimatedPopulation(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city. Case-sensitive

View File

@@ -2,5 +2,6 @@ getContractNames() Netscript Function
=====================================
.. js:function:: getContractNames()
:RAM cost: 0.4 GB
Returns an array of strings containing the names of all Bladeburner contracts

View File

@@ -2,6 +2,7 @@ getCurrentAction() Netscript Function
=====================================
.. js:function:: getCurrentAction()
:RAM cost: 1 GB
Returns an object that represents the player's current Bladeburner action::

View File

@@ -2,5 +2,6 @@ getGeneralActionNames() Netscript Function
==========================================
.. js:function:: getGeneralActionNames()
:RAM cost: 0.4 GB
Returns an array of strings containing the names of all general Bladeburner actions

View File

@@ -2,5 +2,6 @@ getOperationNames() Netscript Function
======================================
.. js:function:: getOperationNames()
:RAM cost: 0.4 GB
Returns an array of strings containing the names of all Bladeburner operations

View File

@@ -2,5 +2,6 @@ getRank() Netscript Function
============================
.. js:function:: getRank()
:RAM cost: 4 GB
Returns the player's Bladeburner Rank

View File

@@ -2,6 +2,7 @@ getSkillLevel() Netscript Function
==================================
.. js:function:: getSkillLevel(skillName="")
:RAM cost: 4 GB
:param string skillName: Name of skill. Case-sensitive and must be an exact match

View File

@@ -2,5 +2,6 @@ getSkillNames() Netscript Function
==================================
.. js:function:: getSkillNames()
:RAM cost: 0.4 GB
Returns an array of strings containing the names of all Bladeburner skills

View File

@@ -2,5 +2,6 @@ getSkillPoints() Netscript Function
===================================
.. js:function:: getSkillPoints()
:RAM cost: 4 GB
Returns the number of Bladeburner skill points you have

View File

@@ -2,6 +2,7 @@ getSkillUpgradeCost() Netscript Function
========================================
.. js:function:: getSkillUpgradeCost(skillName="")
:RAM cost: 4 GB
:param string skillName: Name of skill. Case-sensitive and must be an exact match

View File

@@ -2,6 +2,7 @@ getStamina() Netscript Function
===============================
.. js:function:: getStamina()
:RAM cost: 4 GB
Returns an array with two elements:

View File

@@ -2,6 +2,7 @@ getTeamSize() Netscript Function
================================
.. js:function:: getTeamSize(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ joinBladeburnerDivision() Netscript Function
============================================
.. js:function:: joinBladeburnerDivision()
:RAM cost: 4 GB
Attempts to join the Bladeburner division.

View File

@@ -2,6 +2,7 @@ joinBladeburnerFaction() Netscript Function
===========================================
.. js:function:: joinBladeburnerFaction()
:RAM cost: 4 GB
Attempts to join the Bladeburner faction.

View File

@@ -2,6 +2,7 @@ setActionAutolevel() Netscript Function
=======================================
.. js:function:: setActionAutolevel(type, name, autoLevel)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ setActionLevel() Netscript Function
===================================
.. js:function:: setActionLevel(type, name, level)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ setTeamSize() Netscript Function
================================
.. js:function:: setTeamSize(type, name, size)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,6 +2,7 @@ startAction() Netscript Function
================================
.. js:function:: startAction(type, name)
:RAM cost: 4 GB
:param string type: Type of action. See :ref:`bladeburner_action_types`
:param string name: Name of action. Must be an exact match

View File

@@ -2,5 +2,6 @@ stopBladeburnerAction() Netscript Function
==========================================
.. js:function:: stopBladeburnerAction()
:RAM cost: 2 GB
Stops the current Bladeburner action

View File

@@ -2,6 +2,7 @@ switchCity() Netscript Function
===============================
.. js:function:: switchCity(cityName)
:RAM cost: 4 GB
:param string cityName: Name of city

View File

@@ -2,6 +2,7 @@ upgradeSkill() Netscript Function
=================================
.. js:function:: upgradeSkill(skillName)
:RAM cost: 4 GB
:param string skillName: Name of Skill to be upgraded. Case-sensitive and must be an exact match

View File

@@ -18,3 +18,5 @@ attempt() Netscript Function
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.
:RAM cost: 10 GB

View File

@@ -11,3 +11,5 @@ getContractType() Netscript Function
(e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)
:returns: A string with the contract's problem type
:RAM cost: 5 GB

View File

@@ -10,3 +10,5 @@ getDescription() Netscript Function
Get the full text description for the problem posed by the Coding Contract
:returns: A string with the contract's text description
:RAM cost: 5 GB

View File

@@ -11,3 +11,5 @@ getNumTriesRemaining() Netscript Function
self-destructs.
:returns: Number indicating how many attempts are remaining
:RAM cost: 2 GB

View File

@@ -20,3 +20,5 @@ ascendMember() Netscript Function
agi: Agility multiplier gained from ascending. Decimal form
cha: Charisma multiplier gained from ascending. Decimal form
}
:RAM cost: 4 GB

View File

@@ -4,3 +4,5 @@ canRecruitMember() Netscript Function
.. js:function:: canRecruitMember()
:returns: Boolean indicating whether a member can currently be recruited
:RAM cost: 1 GB

View File

@@ -11,3 +11,5 @@ getBonusTime() Netscript Function
"Bonus time" makes the game progress faster, up to 10x the normal speed.
:returns: Bonus time for the Gang mechanic in seconds
:RAM cost: 0 GB

View File

@@ -7,3 +7,5 @@ getChanceToWinClash() Netscript Function
Returns the chance you have to win a clash with the specified gang. The chance
is returned in decimal form, not percentage
:RAM cost: 4 GB

View File

@@ -10,3 +10,5 @@ getEquipmentCost() Netscript Function
:returns: Cost to purchase the specified Equipment/Augmentation (number). Infinity
for invalid arguments
:RAM cost: 2 GB

View File

@@ -7,3 +7,5 @@ getEquipmentNames() Netscript Function
Gang Members. This includes Augmentations.
:returns: Array of strings of the names of all Equpiment/Augmentations
:RAM cost: 1 GB

View File

@@ -14,3 +14,5 @@ getEquipmentType() Netscript Function
* Augmentation
:returns: A string stating the type of the equipment
:RAM cost: 2 GB

View File

@@ -21,3 +21,5 @@ getGangInformation() Netscript Function
wantedLevel: Gang's wanted level
wantedLevelGainRate: Wanted level gained/lost per second (negative for losses)
}
:RAM cost: 2 GB

View File

@@ -9,6 +9,8 @@ getMemberInformation() Netscript Function
:returns: An object with the gang member information.
:RAM cost: 2 GB
The object has the following structure::
{

View File

@@ -6,3 +6,5 @@ getMemberNames() Netscript Function
Get the names of all Gang members
:returns: An array of the names of all Gang members as strings
:RAM cost: 1 GB

View File

@@ -24,3 +24,5 @@ getOtherGangInformation() Netscript Function
},
... (for all six gangs)
}
:RAM cost: 2 GB

View File

@@ -6,3 +6,5 @@ getTaskNames() Netscript Function
Get the name of all valid tasks that Gang members can be assigned to
:returns: Array of strings of all task names
:RAM cost: 1 GB

View File

@@ -10,3 +10,5 @@ purchaseEquipment() Netscript Function
Gang member.
:returns: True if the equipment was successfully purchased. False otherwise
:RAM cost: 4 GB

View File

@@ -13,3 +13,5 @@ recruitMember() Netscript Function
* There already exists a member with the specified name
:returns: True if the member was successfully recruited. False otherwise
:RAM cost: 2 GB

View File

@@ -10,3 +10,5 @@ setMemberTask() Netscript Function
If an invalid task is specified, the Gang member will be set to idle ("Unassigned")
:returns: True if the Gang Member was successfully assigned to the task. False otherwise
:RAM cost: 2 GB

View File

@@ -6,3 +6,5 @@ setTerritoryWarfare() Netscript Function
:param bool engage: Whether or not to engage in territory warfare
Set whether or not the gang should engage in territory warfare
:RAM cost: 2 GB

View File

@@ -15,3 +15,5 @@ getCacheUpgradeCost() Netscript Function
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Server is already at the max cache level, then Infinity is returned.
:RAM cost: 0 GB

View File

@@ -10,3 +10,5 @@ getCoreUpgradeCost() Netscript Function
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at the max number of cores, then Infinity is returned.
:RAM cost: 0 GB

View File

@@ -10,3 +10,5 @@ getLevelUpgradeCost() Netscript Function
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at max level, then Infinity is returned.
:RAM cost: 0 GB

View File

@@ -15,11 +15,14 @@ getNodeStats() Netscript Function
ram: Node's RAM,
cores: Node's number of cores,
cache: Cache level. Only applicable for Hacknet Servers
hashCapacity: Hash Capacity provided by this Node. Only applicable for Hacknet Servers
production: Node's production per second
timeOnline: Number of seconds since Node has been purchased,
totalProduction: Total amount that the Node has produced
}
:RAM cost: 0 GB
.. note:: Note that for Hacknet Nodes, production refers to the amount of money the node generates.
For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the amount
of hashes the node generates.

View File

@@ -4,3 +4,5 @@ getPurchaseNodeCost() Netscript Function
.. js:function:: getPurchaseNodeCost()
Returns the cost of purchasing a new Hacknet Node
:RAM cost: 0 GB

View File

@@ -10,3 +10,5 @@ getRamUpgradeCost() Netscript Function
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at max RAM, then Infinity is returned.
:RAM cost: 0 GB

View File

@@ -12,6 +12,8 @@ hashCost() Netscript Function
Returns the number of hashes required for the specified upgrade. The name of the
upgrade must be an exact match.
:RAM cost: 0 GB
Example:

View File

@@ -9,3 +9,5 @@ numHashes() Netscript Function
of a Hacknet Node).
Returns the number of hashes you have
:RAM cost: 0 GB

View File

@@ -4,3 +4,5 @@ numNodes() Netscript Function
.. js:function:: numNodes()
Returns the number of Hacknet Nodes you own.
:RAM cost: 0 GB

View File

@@ -9,3 +9,5 @@ purchaseNode() Netscript Function
If the player cannot afford to purchase a new Hacknet Node then the function
will return -1.
:RAM cost: 0 GB

View File

@@ -24,3 +24,5 @@ spendHashes() Netscript Function
hacknet.spendHashes("Sell for Corporation Funds");
hacknet.spendHashes("Increase Maximum Money", "foodnstuff");
:RAM cost: 0 GB

View File

@@ -17,3 +17,5 @@ upgradeCache() Netscript Function
it purchases some positive amount and the Server reaches its max cache level.
Returns false otherwise.
:RAM cost: 0 GB

Some files were not shown because too many files have changed in this diff Show More