From 856d02a129c7dbe081a3307c2843ffc642f2cf27 Mon Sep 17 00:00:00 2001 From: danielyxie Date: Sat, 23 Mar 2019 19:40:35 -0700 Subject: [PATCH] v0.45.1 --- css/bladeburner.scss | 38 +++ css/styles.scss | 40 --- .../netscript/sleeveapi/getSleeveStats.rst | 2 +- package-lock.json | 317 ++++++++++++------ package.json | 4 +- src/Constants.ts | 10 +- src/Corporation/Corporation.jsx | 42 ++- src/Corporation/data/BaseResearchTree.ts | 5 + src/Corporation/data/ResearchMetadata.ts | 15 + src/Corporation/ui/IndustryOffice.jsx | 2 +- src/NetscriptFunctions.js | 4 +- src/PersonObjects/Sleeve/Sleeve.ts | 2 +- src/SaveObject.js | 1 - src/Script/RamCalculations.js | 2 + src/ScriptEditor/Ace.js | 2 +- src/ScriptEditor/AceNetscriptMode.js | 6 +- src/ScriptEditor/CodeMirror.js | 2 +- 17 files changed, 313 insertions(+), 181 deletions(-) diff --git a/css/bladeburner.scss b/css/bladeburner.scss index 5b8287ed6..cc8ce3189 100644 --- a/css/bladeburner.scss +++ b/css/bladeburner.scss @@ -51,6 +51,44 @@ pointer-events: none; } +/* Checkbox for (de)selecting autoleveling */ +.bbcheckbox { + position: relative; + display: inline; + label { + width: 20px; + height: 20px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + background: black; + border-width: 1px; + border-color: white; + border-style: solid; + &:after { + content: ''; + width: 9px; + height: 5px; + position: absolute; + top: 5px; + left: 5px; + border: 3px solid white; + border-top: none; + border-right: none; + opacity: 0; + transform: rotate(-45deg); + } + } + input[type=checkbox] { + margin: 3px; + visibility: hidden; + &:checked + label:after { + opacity: 1; + } + } +} + /* Bladeburner Console */ .bladeburner-console-div { display: inline-block; diff --git a/css/styles.scss b/css/styles.scss index e9204bc08..563a343de 100644 --- a/css/styles.scss +++ b/css/styles.scss @@ -336,43 +336,3 @@ a:visited { .smallfont { font-size: $defaultFontSize * 0.8125; } - -.bbcheckbox { - position: relative; - display: inline; - label { - width: 20px; - height: 20px; - cursor: pointer; - position: absolute; - top: 0; - left: 0; - background: black; - border-width: 1px; - border-color: white; - border-style: solid; - &:after { - content: ''; - width: 9px; - height: 5px; - position: absolute; - top: 4px; - left: 4px; - border: 3px solid white; - border-top: none; - border-right: none; - opacity: 0; - transform: rotate(-45deg); - } - } - input[type=checkbox] { - visibility: hidden; - &:checked + label:after { - opacity: 1; - } - } -} - - - - diff --git a/doc/source/netscript/sleeveapi/getSleeveStats.rst b/doc/source/netscript/sleeveapi/getSleeveStats.rst index f7c538dd8..698fa9e4c 100644 --- a/doc/source/netscript/sleeveapi/getSleeveStats.rst +++ b/doc/source/netscript/sleeveapi/getSleeveStats.rst @@ -1,7 +1,7 @@ getSleeveStats() Netscript Function =================================== -.. js:function:: getStatus(sleeveNumber) +.. js:function:: getSleeveStats(sleeveNumber) :param int sleeveNumber: Index of the sleeve to get stats of. See :ref:`here ` diff --git a/package-lock.json b/package-lock.json index 0fc89cb0b..eeacddaa7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "bitburner", - "version": "0.40.2", + "version": "0.45.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -773,7 +773,8 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true }, "are-we-there-yet": { "version": "1.1.5", @@ -1200,7 +1201,8 @@ "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true }, "bn.js": { "version": "4.11.8", @@ -1446,10 +1448,11 @@ "version": "10.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, "requires": { "bluebird": "3.5.1", - "chownr": "1.0.1", - "glob": "7.1.2", + "chownr": "1.1.1", + "glob": "7.1.3", "graceful-fs": "4.1.11", "lru-cache": "4.1.1", "mississippi": "2.0.0", @@ -1458,14 +1461,15 @@ "promise-inflight": "1.0.1", "rimraf": "2.6.2", "ssri": "5.3.0", - "unique-filename": "1.1.0", + "unique-filename": "1.1.1", "y18n": "4.0.0" }, "dependencies": { "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -1478,7 +1482,8 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true } } }, @@ -2012,9 +2017,10 @@ } }, "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true }, "chrome-trace-event": { "version": "1.0.0", @@ -2360,7 +2366,8 @@ "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "component-emitter": { "version": "1.2.1", @@ -2420,6 +2427,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, "requires": { "inherits": "2.0.3", "readable-stream": "2.3.4", @@ -2499,6 +2507,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, "requires": { "aproba": "1.2.0", "fs-write-stream-atomic": "1.0.10", @@ -2775,7 +2784,8 @@ "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true }, "d": { "version": "1.0.0", @@ -3103,9 +3113,10 @@ } }, "duplexify": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", - "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", @@ -3189,6 +3200,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, "requires": { "once": "1.4.0" } @@ -4087,6 +4099,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, "requires": { "commondir": "1.0.1", "make-dir": "1.2.0", @@ -4097,6 +4110,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { "locate-path": "2.0.0" } @@ -4120,12 +4134,39 @@ "dev": true }, "flush-write-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", - "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.4" + "readable-stream": "2.3.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } } }, "follow-redirects": { @@ -4209,6 +4250,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, "requires": { "inherits": "2.0.3", "readable-stream": "2.3.4" @@ -4218,6 +4260,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, "requires": { "graceful-fs": "4.1.11", "iferr": "0.1.5", @@ -4991,7 +5034,8 @@ "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true }, "ignore": { "version": "3.3.7", @@ -5030,7 +5074,8 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "in-publish": { "version": "2.0.0", @@ -5741,15 +5786,15 @@ "dev": true }, "jshint": { - "version": "2.9.7", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.7.tgz", - "integrity": "sha512-Q8XN38hGsVQhdlM+4gd1Xl7OB1VieSuCJf+fEJjpo59JH99bVJhXRXAh26qQ15wfdd1VPMuDWNeSWoNl53T4YA==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.2.tgz", + "integrity": "sha512-e7KZgCSXMJxznE/4WULzybCMNXNAd/bf5TSrvVEq78Q/K8ZwFpmBqQeDtNiHc3l49nV4E/+YeHU/JZjSUIrLAA==", "requires": { "cli": "1.0.1", "console-browserify": "1.1.0", "exit": "0.1.2", "htmlparser2": "3.8.3", - "lodash": "4.17.10", + "lodash": "4.17.11", "minimatch": "3.0.4", "shelljs": "0.3.0", "strip-json-comments": "1.0.4" @@ -5794,6 +5839,11 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, "readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -6255,6 +6305,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "requires": { "p-locate": "2.0.0", "path-exists": "3.0.0" @@ -6421,6 +6472,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true, "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" @@ -6430,6 +6482,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "dev": true, "requires": { "pify": "3.0.0" }, @@ -6437,7 +6490,8 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -6759,7 +6813,8 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true }, "minimist-options": { "version": "3.0.2", @@ -6775,17 +6830,18 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, "requires": { "concat-stream": "1.6.0", - "duplexify": "3.5.4", + "duplexify": "3.7.1", "end-of-stream": "1.4.1", - "flush-write-stream": "1.0.2", + "flush-write-stream": "1.1.1", "from2": "2.3.0", "parallel-transform": "1.1.0", "pump": "2.0.1", - "pumpify": "1.4.0", - "stream-each": "1.2.2", - "through2": "2.0.3" + "pumpify": "1.5.1", + "stream-each": "1.2.3", + "through2": "2.0.5" } }, "mixin-deep": { @@ -6831,6 +6887,7 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, "requires": { "minimist": "0.0.8" } @@ -6892,6 +6949,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, "requires": { "aproba": "1.2.0", "copy-concurrently": "1.0.5", @@ -7529,6 +7587,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, "requires": { "p-try": "1.0.0" } @@ -7537,6 +7596,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { "p-limit": "1.2.0" } @@ -7550,7 +7610,8 @@ "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true }, "pako": { "version": "1.0.6", @@ -7561,6 +7622,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, "requires": { "cyclist": "0.2.2", "inherits": "2.0.3", @@ -7668,7 +7730,8 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", @@ -7749,6 +7812,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, "requires": { "find-up": "2.1.0" } @@ -8650,7 +8714,8 @@ "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true }, "prop-types": { "version": "15.7.2", @@ -8686,7 +8751,8 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true }, "psl": { "version": "1.1.31", @@ -8711,17 +8777,19 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, "requires": { "end-of-stream": "1.4.1", "once": "1.4.0" } }, "pumpify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.4.0.tgz", - "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, "requires": { - "duplexify": "3.5.4", + "duplexify": "3.7.1", "inherits": "2.0.3", "pump": "2.0.1" } @@ -9379,6 +9447,7 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, "requires": { "glob": "7.1.2" }, @@ -9387,6 +9456,7 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -9421,6 +9491,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, "requires": { "aproba": "1.2.0" } @@ -9817,9 +9888,10 @@ } }, "serialize-javascript": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.4.0.tgz", - "integrity": "sha1-fJWFFNtqwkQ6irwGLcn3iGp/YAU=" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "dev": true }, "serve-index": { "version": "1.9.1", @@ -10293,7 +10365,8 @@ "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true }, "source-map": { "version": "0.7.3", @@ -10446,6 +10519,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, "requires": { "safe-buffer": "5.1.1" } @@ -10560,9 +10634,10 @@ } }, "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, "requires": { "end-of-stream": "1.4.1", "stream-shift": "1.0.0" @@ -10610,7 +10685,8 @@ "stream-shift": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true }, "strict-uri-encode": { "version": "1.1.0", @@ -11360,12 +11436,39 @@ "dev": true }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "requires": { - "readable-stream": "2.3.4", + "readable-stream": "2.3.6", "xtend": "4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } } }, "thunky": { @@ -11694,7 +11797,8 @@ "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true }, "typescript": { "version": "2.9.2", @@ -11706,6 +11810,7 @@ "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, "requires": { "commander": "2.13.0", "source-map": "0.6.1" @@ -11714,12 +11819,14 @@ "commander": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -11765,59 +11872,42 @@ "optional": true }, "uglifyjs-webpack-plugin": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", - "integrity": "sha512-hIQJ1yxAPhEA2yW/i7Fr+SXZVMp+VEI3d42RTHBgQd2yhp/1UdBcR3QEWPV5ahBxlqQDMEMTuTEvDHSFINfwSw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", + "dev": true, "requires": { "cacache": "10.0.4", "find-cache-dir": "1.0.0", "schema-utils": "0.4.5", - "serialize-javascript": "1.4.0", + "serialize-javascript": "1.6.1", "source-map": "0.6.1", "uglify-es": "3.3.9", "webpack-sources": "1.1.0", "worker-farm": "1.6.0" }, "dependencies": { - "ajv": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", - "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", - "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" - } - }, - "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", - "requires": { - "ajv": "6.5.1", - "ajv-keywords": "3.2.0" - } + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + } } } }, @@ -11893,17 +11983,19 @@ "dev": true }, "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, "requires": { - "unique-slug": "2.0.0" + "unique-slug": "2.0.1" } }, "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "dev": true, "requires": { "imurmurhash": "0.1.4" } @@ -12024,6 +12116,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "2.1.1" }, @@ -12031,7 +12124,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true } } }, @@ -12328,7 +12422,7 @@ "node-libs-browser": "2.1.0", "schema-utils": "0.4.5", "tapable": "1.0.0", - "uglifyjs-webpack-plugin": "1.2.5", + "uglifyjs-webpack-plugin": "1.3.0", "watchpack": "1.6.0", "webpack-sources": "1.1.0" }, @@ -12736,6 +12830,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, "requires": { "source-list-map": "2.0.0", "source-map": "0.6.1" @@ -12744,7 +12839,8 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -12811,6 +12907,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, "requires": { "errno": "0.1.7" } @@ -12913,7 +13010,8 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true }, "y18n": { "version": "3.2.1", @@ -12924,7 +13022,8 @@ "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true }, "yargs": { "version": "11.1.0", diff --git a/package.json b/package.json index b54c0d093..4b9f170d0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "react-dom": "^16.8.3", "sprintf-js": "^1.1.1", "tapable": "^1.0.0", - "uuid": "^3.2.1", "w3c-blob": "0.0.1" }, @@ -83,7 +82,8 @@ "ts-loader": "^4.4.1", "tslint": "^5.10.0", "typescript": "^2.9.2", - "uglifyjs-webpack-plugin": "^1.2.5", + "uglify-es": "^3.3.9", + "uglifyjs-webpack-plugin": "^1.3.0", "url-loader": "^1.0.1", "watchpack": "^1.6.0", "webpack": "^4.12.0", diff --git a/src/Constants.ts b/src/Constants.ts index 38530ad2c..6f376fa50 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -1,7 +1,7 @@ import {IMap} from "./types"; export let CONSTANTS: IMap = { - Version: "0.45.0", + Version: "0.45.1", //Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience //and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then @@ -282,6 +282,12 @@ export let CONSTANTS: IMap = { LatestUpdate: ` + v0.45.1 + * Added two new Corporation Researches + * General UI improvements (by hydroflame and koriar) + * Bug Fix: Sleeve Netscript API should no longer cause Dynamic RAM errors + * Bug Fix: sleeve.getSleeveStats() should now work properly + v0.45.0 * Corporation changes: ** Decreased the time of a full market cycle from 15 seconds to 10 seconds. @@ -301,7 +307,6 @@ export let CONSTANTS: IMap = { ** Reduced the amount of money you gain from private investors ** Training employees is now 3x more effective ** Bug Fix: An industry's products are now properly separated between different cities - * The QLink Augemntation is now significantly stronger, but also significantly more expensive (by hydroflame) * Added a Netscript API for Duplicate Sleeves (by hydroflame) * Modified the multipliers of BitNode-3 and BitNode-8 to make them slightly harder @@ -310,5 +315,4 @@ export let CONSTANTS: IMap = { * Bug Fix: growthAnalyze() function now properly accounts for BitNode multipliers * Bug Fix: The cost of purchasing Augmentations for Duplicate Sleeves no longer scales with how many Augs you've purchased for yourself ` - } diff --git a/src/Corporation/Corporation.jsx b/src/Corporation/Corporation.jsx index b6d963c68..cb69bd9f5 100644 --- a/src/Corporation/Corporation.jsx +++ b/src/Corporation/Corporation.jsx @@ -61,7 +61,6 @@ import { CorporationRouting } from "./ui/Routing"; import Decimal from "decimal.js"; - /* Constants */ export const INITIALSHARES = 1e9; //Total number of shares you have at your company export const SHARESPERPRICEUPDATE = 1e6; //When selling large number of shares, price is dynamically updated for every batch of this amount @@ -490,11 +489,11 @@ Industry.prototype.process = function(marketCycles=1, state, company) { this.thisCycleRevenue = new Decimal(0); this.thisCycleExpenses = new Decimal(0); - //Once you start making revenue, the player should no longer be - //considered new, and therefore no longer needs the 'tutorial' UI elements + // Once you start making revenue, the player should no longer be + // considered new, and therefore no longer needs the 'tutorial' UI elements if (this.lastCycleRevenue.gt(0)) {this.newInd = false;} - //Process offices (and the employees in them) + // Process offices (and the employees in them) var employeeSalary = 0; for (var officeLoc in this.offices) { if (this.offices[officeLoc] instanceof OfficeSpace) { @@ -503,15 +502,15 @@ Industry.prototype.process = function(marketCycles=1, state, company) { } this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); - //Process change in demand/competition of materials/products + // Process change in demand/competition of materials/products this.processMaterialMarket(marketCycles); this.processProductMarket(marketCycles); - //Process loss of popularity + // Process loss of popularity this.popularity -= (marketCycles * .0001); this.popularity = Math.max(0, this.popularity); - //Process Dreamsense gains + // Process Dreamsense gains var popularityGain = company.getDreamSenseGain(), awarenessGain = popularityGain * 4; if (popularityGain > 0) { this.popularity += (popularityGain * marketCycles); @@ -521,19 +520,19 @@ Industry.prototype.process = function(marketCycles=1, state, company) { return; } - //Process production, purchase, and import/export of materials + // Process production, purchase, and import/export of materials var res = this.processMaterials(marketCycles, company); this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]); this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]); - //Process creation, production & sale of products + // Process creation, production & sale of products res = this.processProducts(marketCycles, company); this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]); this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]); } -//Process change in demand and competition for this industry's materials +// Process change in demand and competition for this industry's materials Industry.prototype.processMaterialMarket = function(marketCycles=1) { //References to prodMats and reqMats var reqMats = this.reqMats, prodMats = this.prodMats; @@ -1334,10 +1333,8 @@ Industry.prototype.createResearchBox = function() { researchTreeBox = null; } - this.updateResearchTree(); const researchTree = IndustryResearchTrees[this.type]; - // Create the popup first, so that the tree diagram can be added to it // This is handled by Treant researchTreeBox = createPopup(boxId, [], { backgroundColor: "black" }); @@ -1387,6 +1384,10 @@ Industry.prototype.createResearchBox = function() { researchTree.research(allResearch[i]); this.researched[allResearch[i]] = true; + dialogBoxCreate(`Researched ${allResearch[i]}. It may take a market cycle ` + + `(~${SecsPerMarketCycle} seconds) before the effects of ` + + `the Research apply.`); + return this.createResearchBox(); } else { dialogBoxCreate(`You do not have enough Scientific Research for ${research.name}`); @@ -1647,6 +1648,14 @@ OfficeSpace.prototype.atCapacity = function() { OfficeSpace.prototype.process = function(marketCycles=1, parentRefs) { var corporation = parentRefs.corporation, industry = parentRefs.industry; + // HRBuddy AutoRecruitment and training + if (industry.hasResearch("HRBuddy-Recruitment") && !this.atCapacity()) { + const emp = this.hireRandomEmployee(); + if (industry.hasResearch("HRBuddy-Training")) { + emp.pos = EmployeePositions.Training; + } + } + // Process Office properties this.maxEne = 100; this.maxHap = 100; @@ -1828,8 +1837,7 @@ OfficeSpace.prototype.hireEmployee = function(employee, parentRefs) { yesNoTxtInpBoxCreate("Give your employee a nickname!"); } -OfficeSpace.prototype.hireRandomEmployee = function(parentRefs) { - var company = parentRefs.corporation, division = parentRefs.industry; +OfficeSpace.prototype.hireRandomEmployee = function() { if (this.atCapacity()) { return; } if (document.getElementById("cmpy-mgmt-hire-employee-popup") != null) {return;} @@ -1853,13 +1861,15 @@ OfficeSpace.prototype.hireRandomEmployee = function(parentRefs) { var name = generateRandomString(7); - for (var i = 0; i < this.employees.length; ++i) { + for (let i = 0; i < this.employees.length; ++i) { if (this.employees[i].name === name) { - return this.hireRandomEmployee(parentRefs); + return this.hireRandomEmployee(); } } emp.name = name; this.employees.push(emp); + + return emp; } //Finds the first unassigned employee and assigns its to the specified job diff --git a/src/Corporation/data/BaseResearchTree.ts b/src/Corporation/data/BaseResearchTree.ts index a4e535e1c..b13ebd28b 100644 --- a/src/Corporation/data/BaseResearchTree.ts +++ b/src/Corporation/data/BaseResearchTree.ts @@ -27,6 +27,8 @@ function createBaseResearchTreeNodes(): Node { const dronesAssembly: Node = makeNode("Drones - Assembly"); const dronesTransport: Node = makeNode("Drones - Transport"); const goJuice: Node = makeNode("Go-Juice"); + const hrRecruitment: Node = makeNode("HRBuddy-Recruitment"); + const hrTraining: Node = makeNode("HRBuddy-Training"); const joywire: Node = makeNode("JoyWire"); const marketta1: Node = makeNode("Market-TA.I"); const marketta2: Node = makeNode("Market-TA.II"); @@ -40,6 +42,8 @@ function createBaseResearchTreeNodes(): Node { drones.addChild(dronesAssembly); drones.addChild(dronesTransport); + hrRecruitment.addChild(hrTraining); + marketta1.addChild(marketta2); overclock.addChild(stimu); @@ -49,6 +53,7 @@ function createBaseResearchTreeNodes(): Node { rootNode.addChild(autoDrugs); rootNode.addChild(bulkPurchasing); rootNode.addChild(drones); + rootNode.addChild(hrRecruitment); rootNode.addChild(joywire); rootNode.addChild(marketta1); rootNode.addChild(overclock); diff --git a/src/Corporation/data/ResearchMetadata.ts b/src/Corporation/data/ResearchMetadata.ts index 73e6ec5d5..e19d730b2 100644 --- a/src/Corporation/data/ResearchMetadata.ts +++ b/src/Corporation/data/ResearchMetadata.ts @@ -77,6 +77,21 @@ export const researchMetadata: IConstructorParams[] = [ "production by 10%.", sciResearchMult: 1.1, }, + { + name: "HRBuddy-Recruitment", + cost: 15e3, + desc: "Use automated software to handle the hiring of employees. With this " + + "research, each office will automatically hire one employee per " + + "market cycle if there is available space." + + }, + { + name: "HRBuddy-Training", + cost: 20e3, + desc: "Use automated software to handle the training of employees. With this " + + "research, each employee hired with HRBuddy-Recruitment will automatically " + + "be assigned to 'Training', rather than being unassigned." + }, { name: "JoyWire", cost: 20e3, diff --git a/src/Corporation/ui/IndustryOffice.jsx b/src/Corporation/ui/IndustryOffice.jsx index 54ce1dfa7..65626d327 100644 --- a/src/Corporation/ui/IndustryOffice.jsx +++ b/src/Corporation/ui/IndustryOffice.jsx @@ -554,7 +554,7 @@ export class IndustryOffice extends BaseReactComponent { } const autohireEmployeeButtonOnClick = () => { if (office.atCapacity()) { return; } - office.hireRandomEmployee({ corporation: corp, industry: division }); + office.hireRandomEmployee(); this.corp().rerender(); } diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 6d246a1d2..669bce884 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -4975,9 +4975,9 @@ function NetscriptFunctions(workerScript) { return false; } - const sl = Player.sleeves[i]; + const sl = Player.sleeves[sleeveNumber]; return { - shock: sl.shock, + shock: 100 - sl.shock, sync: sl.sync, hacking_skill: sl.hacking_skill, strength: sl.strength, diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 6f5a27c98..eb5cf8947 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -118,7 +118,7 @@ export class Sleeve extends Person { memory: number = 0; /** - * Sleeve shock. Number between 1 and 100 + * Sleeve shock. Number between 0 and 100 * Trauma/shock that comes with being in a sleeve. Experience earned * is multipled by shock%. This gets applied before synchronization * diff --git a/src/SaveObject.js b/src/SaveObject.js index 27af3062a..5edc37780 100755 --- a/src/SaveObject.js +++ b/src/SaveObject.js @@ -55,7 +55,6 @@ function BitburnerSaveObject() { this.FconfSettingsSave = ""; this.VersionSave = ""; this.AllGangsSave = ""; - this.CorporationResearchTreesSave = ""; } BitburnerSaveObject.prototype.getSaveString = function() { diff --git a/src/Script/RamCalculations.js b/src/Script/RamCalculations.js index 643845a8e..ac4c1a2ef 100644 --- a/src/Script/RamCalculations.js +++ b/src/Script/RamCalculations.js @@ -160,6 +160,8 @@ async function parseOnlyRamCalculate(server, code, workerScript) { func = workerScript.env.vars.codingcontract[ref]; } else if (ref in workerScript.env.vars.gang) { func = workerScript.env.vars.gang[ref]; + } else if (ref in workerScript.env.vars.sleeve) { + func = workerScript.env.vars.sleeve[ref]; } else { func = workerScript.env.get(ref); } diff --git a/src/ScriptEditor/Ace.js b/src/ScriptEditor/Ace.js index da53f92d4..aa4e92966 100644 --- a/src/ScriptEditor/Ace.js +++ b/src/ScriptEditor/Ace.js @@ -114,7 +114,7 @@ class AceEditorWrapper extends ScriptEditor { }); //Get functions from namespaces - const namespaces = ["bladeburner", "hacknet", "codingcontract", "gang"]; + const namespaces = ["bladeburner", "hacknet", "codingcontract", "gang", "sleeve"]; if (namespaces.includes(name)) { let namespace = fns[name]; if (typeof namespace !== "object") {continue;} diff --git a/src/ScriptEditor/AceNetscriptMode.js b/src/ScriptEditor/AceNetscriptMode.js index 18ca0030a..d3472d26f 100644 --- a/src/ScriptEditor/AceNetscriptMode.js +++ b/src/ScriptEditor/AceNetscriptMode.js @@ -128,9 +128,9 @@ let NetscriptFunctions = "getNumTriesRemaining|" + // Sleeve API - "sleeve|getNumSleeves|setToShockRecovery|setToSynchronize|setToCommitCrime|" + - "setToUniversityCourse|travel|setToCompanyWork|setToFactionWork|setToGymWorkout|" + - "getSleeveStats|getTask|getInformation"; + "sleeve|getNumSleeves|setToShockRecovery|setToSynchronize|" + + "setToCommitCrime|setToUniversityCourse|travel|setToCompanyWork|" + + "setToFactionWork|setToGymWorkout|getSleeveStats|getTask|getInformation"; var NetscriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ diff --git a/src/ScriptEditor/CodeMirror.js b/src/ScriptEditor/CodeMirror.js index 6a04324d9..886de678d 100644 --- a/src/ScriptEditor/CodeMirror.js +++ b/src/ScriptEditor/CodeMirror.js @@ -182,7 +182,7 @@ class CodeMirrorEditorWrapper extends ScriptEditor { netscriptFns.push(name); //Get functions from namespaces - const namespaces = ["bladeburner", "hacknet", "codingcontract", "gang"]; + const namespaces = ["bladeburner", "hacknet", "codingcontract", "gang", "sleeve"]; if (namespaces.includes(name)) { let namespace = fnsObj[name]; if (typeof namespace !== "object") {continue;}