mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 06:32:26 +01:00
update prettier
This commit is contained in:
parent
c1945ab12e
commit
66a2adaeb4
31
index.html
31
index.html
@ -1,18 +1,18 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8" />
|
||||||
<title>Bitburner</title>
|
<title>Bitburner</title>
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="dist/apple-touch-icon.png"/>
|
<link rel="apple-touch-icon" sizes="180x180" href="dist/apple-touch-icon.png" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="dist/favicon-32x32.png"/>
|
<link rel="icon" type="image/png" sizes="32x32" href="dist/favicon-32x32.png" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="dist/favicon-16x16.png"/>
|
<link rel="icon" type="image/png" sizes="16x16" href="dist/favicon-16x16.png" />
|
||||||
<link rel="manifest" href="dist/site.webmanifest"/>
|
<link rel="manifest" href="dist/site.webmanifest" />
|
||||||
<link rel="mask-icon" href="dist/safari-pinned-tab.svg" color="#000000"/>
|
<link rel="mask-icon" href="dist/safari-pinned-tab.svg" color="#000000" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Bitburner"/>
|
<meta name="apple-mobile-web-app-title" content="Bitburner" />
|
||||||
<meta name="application-name" content="Bitburner"/>
|
<meta name="application-name" content="Bitburner" />
|
||||||
<meta name="msapplication-TileColor" content="#000000"/>
|
<meta name="msapplication-TileColor" content="#000000" />
|
||||||
<meta name="msapplication-config" content="dist/browserconfig.xml"/>
|
<meta name="msapplication-config" content="dist/browserconfig.xml" />
|
||||||
<meta name="theme-color" content="#ffffff"/>
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
|
||||||
<!-- Google Analytics -->
|
<!-- Google Analytics -->
|
||||||
<script>
|
<script>
|
||||||
@ -36,7 +36,10 @@
|
|||||||
ga("send", "pageview");
|
ga("send", "pageview");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="favicon.ico"><link href="dist/vendor.css" rel="stylesheet"><link href="main.css" rel="stylesheet"></head>
|
<link rel="shortcut icon" href="favicon.ico" />
|
||||||
|
<link href="dist/vendor.css" rel="stylesheet" />
|
||||||
|
<link href="main.css" rel="stylesheet" />
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="entire-game-container">
|
<div id="entire-game-container">
|
||||||
<div id="mainmenu-container" style="display: flex; flex-direction: row"></div>
|
<div id="mainmenu-container" style="display: flex; flex-direction: row"></div>
|
||||||
@ -48,7 +51,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
||||||
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
|
<script type="text/javascript" src="dist/vendor.bundle.js"></script>
|
||||||
|
<script type="text/javascript" src="main.bundle.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
<script src="src/ThirdParty/raphael.min.js"></script>
|
<script src="src/ThirdParty/raphael.min.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
59903
main.bundle.js
59903
main.bundle.js
File diff suppressed because one or more lines are too long
@ -2,433 +2,366 @@ const numSpaces = 4;
|
|||||||
const maxLineLength = 160;
|
const maxLineLength = 160;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"env": {
|
env: {
|
||||||
"es6": true,
|
es6: true,
|
||||||
"node": true
|
node: true,
|
||||||
|
},
|
||||||
|
extends: "eslint:recommended",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaFeatures: {
|
||||||
|
experimentalObjectRestSpread: true,
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
ecmaVersion: 8,
|
||||||
"parserOptions": {
|
sourceType: "module",
|
||||||
"ecmaFeatures": {
|
},
|
||||||
"experimentalObjectRestSpread": true
|
rules: {
|
||||||
},
|
"accessor-pairs": [
|
||||||
"ecmaVersion": 8,
|
"error",
|
||||||
"sourceType": "module"
|
{
|
||||||
},
|
getWithoutSet: false,
|
||||||
"rules": {
|
setWithoutGet: true,
|
||||||
"accessor-pairs": [
|
},
|
||||||
"error",
|
],
|
||||||
{
|
"array-bracket-newline": ["error"],
|
||||||
"getWithoutSet": false,
|
"array-bracket-spacing": ["error"],
|
||||||
"setWithoutGet": true
|
"array-callback-return": ["error"],
|
||||||
}
|
"array-element-newline": ["error"],
|
||||||
],
|
"arrow-body-style": ["error"],
|
||||||
"array-bracket-newline": ["error"],
|
"arrow-parens": ["error"],
|
||||||
"array-bracket-spacing": ["error"],
|
"arrow-spacing": ["error"],
|
||||||
"array-callback-return": ["error"],
|
"block-scoped-var": ["error"],
|
||||||
"array-element-newline": ["error"],
|
"block-spacing": ["error"],
|
||||||
"arrow-body-style": ["error"],
|
"brace-style": ["error"],
|
||||||
"arrow-parens": ["error"],
|
"callback-return": ["error"],
|
||||||
"arrow-spacing": ["error"],
|
camelcase: ["error"],
|
||||||
"block-scoped-var": ["error"],
|
"capitalized-comments": ["error"],
|
||||||
"block-spacing": ["error"],
|
"class-methods-use-this": ["error"],
|
||||||
"brace-style": ["error"],
|
"comma-dangle": ["error"],
|
||||||
"callback-return": ["error"],
|
"comma-spacing": ["error"],
|
||||||
"camelcase": ["error"],
|
"comma-style": ["error", "last"],
|
||||||
"capitalized-comments": ["error"],
|
complexity: ["error"],
|
||||||
"class-methods-use-this": ["error"],
|
"computed-property-spacing": ["error", "never"],
|
||||||
"comma-dangle": ["error"],
|
"consistent-return": ["error"],
|
||||||
"comma-spacing": ["error"],
|
"consistent-this": ["error"],
|
||||||
"comma-style": [
|
"constructor-super": ["error"],
|
||||||
"error",
|
curly: ["error"],
|
||||||
"last"
|
"default-case": ["error"],
|
||||||
],
|
"dot-location": ["error", "property"],
|
||||||
"complexity": ["error"],
|
"dot-notation": ["error"],
|
||||||
"computed-property-spacing": [
|
"eol-last": ["error"],
|
||||||
"error",
|
eqeqeq: ["error"],
|
||||||
"never"
|
"for-direction": ["error"],
|
||||||
],
|
"func-call-spacing": ["error"],
|
||||||
"consistent-return": ["error"],
|
"func-name-matching": ["error"],
|
||||||
"consistent-this": ["error"],
|
"func-names": ["error", "never"],
|
||||||
"constructor-super": ["error"],
|
"func-style": ["error"],
|
||||||
"curly": ["error"],
|
"function-paren-newline": ["error"],
|
||||||
"default-case": ["error"],
|
"generator-star-spacing": ["error", "before"],
|
||||||
"dot-location": [
|
"getter-return": [
|
||||||
"error",
|
"error",
|
||||||
"property"
|
{
|
||||||
],
|
allowImplicit: false,
|
||||||
"dot-notation": ["error"],
|
},
|
||||||
"eol-last": ["error"],
|
],
|
||||||
"eqeqeq": ["error"],
|
"global-require": ["error"],
|
||||||
"for-direction": ["error"],
|
"guard-for-in": ["error"],
|
||||||
"func-call-spacing": ["error"],
|
"handle-callback-err": ["error"],
|
||||||
"func-name-matching": ["error"],
|
"id-blacklist": ["error"],
|
||||||
"func-names": [
|
"id-length": ["error"],
|
||||||
"error",
|
"id-match": ["error"],
|
||||||
"never"
|
"implicit-arrow-linebreak": ["error", "beside"],
|
||||||
],
|
indent: [
|
||||||
"func-style": ["error"],
|
"error",
|
||||||
"function-paren-newline": ["error"],
|
numSpaces,
|
||||||
"generator-star-spacing": [
|
{
|
||||||
"error",
|
SwitchCase: 1,
|
||||||
"before"
|
},
|
||||||
],
|
],
|
||||||
"getter-return": [
|
"init-declarations": ["error"],
|
||||||
"error",
|
"jsx-quotes": ["error"],
|
||||||
{
|
"key-spacing": ["error"],
|
||||||
"allowImplicit": false
|
"keyword-spacing": ["error"],
|
||||||
}
|
"line-comment-position": ["error"],
|
||||||
],
|
"linebreak-style": ["error", "windows"],
|
||||||
"global-require": ["error"],
|
"lines-around-comment": ["error"],
|
||||||
"guard-for-in": ["error"],
|
"lines-between-class-members": ["error"],
|
||||||
"handle-callback-err": ["error"],
|
"max-depth": ["error"],
|
||||||
"id-blacklist": ["error"],
|
"max-len": ["error", maxLineLength],
|
||||||
"id-length": ["error"],
|
"max-lines": [
|
||||||
"id-match": ["error"],
|
"error",
|
||||||
"implicit-arrow-linebreak": [
|
{
|
||||||
"error",
|
skipBlankLines: true,
|
||||||
"beside"
|
skipComments: true,
|
||||||
],
|
},
|
||||||
"indent": [
|
],
|
||||||
"error",
|
"max-nested-callbacks": ["error"],
|
||||||
numSpaces,
|
"max-params": ["error"],
|
||||||
{
|
"max-statements": ["error"],
|
||||||
"SwitchCase": 1
|
"max-statements-per-line": ["error"],
|
||||||
}
|
"multiline-comment-style": ["off", "starred-block"],
|
||||||
],
|
"multiline-ternary": ["error", "never"],
|
||||||
"init-declarations": ["error"],
|
"new-cap": ["error"],
|
||||||
"jsx-quotes": ["error"],
|
"new-parens": ["error"],
|
||||||
"key-spacing": ["error"],
|
// TODO: configure this...
|
||||||
"keyword-spacing": ["error"],
|
"newline-before-return": ["error"],
|
||||||
"line-comment-position": ["error"],
|
"newline-per-chained-call": ["error"],
|
||||||
"linebreak-style": [
|
"no-alert": ["error"],
|
||||||
"error",
|
"no-array-constructor": ["error"],
|
||||||
"windows"
|
"no-await-in-loop": ["error"],
|
||||||
],
|
"no-bitwise": ["error"],
|
||||||
"lines-around-comment": ["error"],
|
"no-buffer-constructor": ["error"],
|
||||||
"lines-between-class-members": ["error"],
|
"no-caller": ["error"],
|
||||||
"max-depth": ["error"],
|
"no-case-declarations": ["error"],
|
||||||
"max-len": [
|
"no-catch-shadow": ["error"],
|
||||||
"error",
|
"no-class-assign": ["error"],
|
||||||
maxLineLength
|
"no-compare-neg-zero": ["error"],
|
||||||
],
|
"no-cond-assign": ["error", "except-parens"],
|
||||||
"max-lines": [
|
"no-confusing-arrow": ["error"],
|
||||||
"error",
|
"no-console": ["error"],
|
||||||
{
|
"no-const-assign": ["error"],
|
||||||
"skipBlankLines": true,
|
"no-constant-condition": [
|
||||||
"skipComments": true
|
"error",
|
||||||
}
|
{
|
||||||
],
|
checkLoops: false,
|
||||||
"max-nested-callbacks": ["error"],
|
},
|
||||||
"max-params": ["error"],
|
],
|
||||||
"max-statements": ["error"],
|
"no-continue": ["off"],
|
||||||
"max-statements-per-line": ["error"],
|
"no-control-regex": ["error"],
|
||||||
"multiline-comment-style": [
|
"no-debugger": ["error"],
|
||||||
"off",
|
"no-delete-var": ["error"],
|
||||||
"starred-block"
|
"no-div-regex": ["error"],
|
||||||
],
|
"no-dupe-args": ["error"],
|
||||||
"multiline-ternary": [
|
"no-dupe-class-members": ["error"],
|
||||||
"error",
|
"no-dupe-keys": ["error"],
|
||||||
"never"
|
"no-duplicate-case": ["error"],
|
||||||
],
|
"no-duplicate-imports": [
|
||||||
"new-cap": ["error"],
|
"error",
|
||||||
"new-parens": ["error"],
|
{
|
||||||
// TODO: configure this...
|
includeExports: true,
|
||||||
"newline-before-return": ["error"],
|
},
|
||||||
"newline-per-chained-call": ["error"],
|
],
|
||||||
"no-alert": ["error"],
|
"no-else-return": ["error"],
|
||||||
"no-array-constructor": ["error"],
|
"no-empty": [
|
||||||
"no-await-in-loop": ["error"],
|
"error",
|
||||||
"no-bitwise": ["error"],
|
{
|
||||||
"no-buffer-constructor": ["error"],
|
allowEmptyCatch: false,
|
||||||
"no-caller": ["error"],
|
},
|
||||||
"no-case-declarations": ["error"],
|
],
|
||||||
"no-catch-shadow": ["error"],
|
"no-empty-character-class": ["error"],
|
||||||
"no-class-assign": ["error"],
|
"no-empty-function": ["error"],
|
||||||
"no-compare-neg-zero": ["error"],
|
"no-empty-pattern": ["error"],
|
||||||
"no-cond-assign": [
|
"no-eq-null": ["error"],
|
||||||
"error",
|
"no-eval": ["error"],
|
||||||
"except-parens"
|
"no-ex-assign": ["error"],
|
||||||
],
|
"no-extend-native": ["error"],
|
||||||
"no-confusing-arrow": ["error"],
|
"no-extra-bind": ["error"],
|
||||||
"no-console": ["error"],
|
"no-extra-boolean-cast": ["error"],
|
||||||
"no-const-assign": ["error"],
|
"no-extra-label": ["error"],
|
||||||
"no-constant-condition": [
|
"no-extra-parens": [
|
||||||
"error",
|
"error",
|
||||||
{
|
"all",
|
||||||
"checkLoops": false
|
{
|
||||||
}
|
conditionalAssign: false,
|
||||||
],
|
},
|
||||||
"no-continue": ["off"],
|
],
|
||||||
"no-control-regex": ["error"],
|
"no-extra-semi": ["error"],
|
||||||
"no-debugger": ["error"],
|
"no-fallthrough": ["error"],
|
||||||
"no-delete-var": ["error"],
|
"no-floating-decimal": ["error"],
|
||||||
"no-div-regex": ["error"],
|
"no-func-assign": ["error"],
|
||||||
"no-dupe-args": ["error"],
|
"no-global-assign": ["error"],
|
||||||
"no-dupe-class-members": ["error"],
|
"no-implicit-coercion": ["error"],
|
||||||
"no-dupe-keys": ["error"],
|
"no-implicit-globals": ["error"],
|
||||||
"no-duplicate-case": ["error"],
|
"no-implied-eval": ["error"],
|
||||||
"no-duplicate-imports": [
|
"no-inline-comments": ["error"],
|
||||||
"error",
|
"no-inner-declarations": ["error", "both"],
|
||||||
{
|
"no-invalid-regexp": ["error"],
|
||||||
"includeExports": true
|
"no-invalid-this": ["error"],
|
||||||
}
|
"no-irregular-whitespace": [
|
||||||
],
|
"error",
|
||||||
"no-else-return": ["error"],
|
{
|
||||||
"no-empty": [
|
skipComments: false,
|
||||||
"error",
|
skipRegExps: false,
|
||||||
{
|
skipStrings: false,
|
||||||
"allowEmptyCatch": false
|
skipTemplates: false,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
"no-empty-character-class": ["error"],
|
"no-iterator": ["error"],
|
||||||
"no-empty-function": ["error"],
|
"no-label-var": ["error"],
|
||||||
"no-empty-pattern": ["error"],
|
"no-labels": ["error"],
|
||||||
"no-eq-null": ["error"],
|
"no-lone-blocks": ["error"],
|
||||||
"no-eval": ["error"],
|
"no-lonely-if": ["error"],
|
||||||
"no-ex-assign": ["error"],
|
"no-loop-func": ["error"],
|
||||||
"no-extend-native": ["error"],
|
"no-magic-numbers": [
|
||||||
"no-extra-bind": ["error"],
|
"error",
|
||||||
"no-extra-boolean-cast": ["error"],
|
{
|
||||||
"no-extra-label": ["error"],
|
ignore: [-1, 0, 1],
|
||||||
"no-extra-parens": [
|
ignoreArrayIndexes: true,
|
||||||
"error",
|
},
|
||||||
"all",
|
],
|
||||||
{
|
"no-mixed-operators": ["error"],
|
||||||
"conditionalAssign": false
|
"no-mixed-requires": ["error"],
|
||||||
}
|
"no-mixed-spaces-and-tabs": ["error"],
|
||||||
],
|
"no-multi-assign": ["error"],
|
||||||
"no-extra-semi": ["error"],
|
"no-multi-spaces": ["error"],
|
||||||
"no-fallthrough": ["error"],
|
"no-multi-str": ["error"],
|
||||||
"no-floating-decimal": ["error"],
|
"no-multiple-empty-lines": [
|
||||||
"no-func-assign": ["error"],
|
"error",
|
||||||
"no-global-assign": ["error"],
|
{
|
||||||
"no-implicit-coercion": ["error"],
|
max: 1,
|
||||||
"no-implicit-globals": ["error"],
|
},
|
||||||
"no-implied-eval": ["error"],
|
],
|
||||||
"no-inline-comments": ["error"],
|
"no-native-reassign": ["error"],
|
||||||
"no-inner-declarations": [
|
"no-negated-condition": ["error"],
|
||||||
"error",
|
"no-negated-in-lhs": ["error"],
|
||||||
"both"
|
"no-nested-ternary": ["error"],
|
||||||
],
|
"no-new": ["error"],
|
||||||
"no-invalid-regexp": ["error"],
|
"no-new-func": ["error"],
|
||||||
"no-invalid-this": ["error"],
|
"no-new-object": ["error"],
|
||||||
"no-irregular-whitespace": [
|
"no-new-require": ["error"],
|
||||||
"error",
|
"no-new-symbol": ["error"],
|
||||||
{
|
"no-new-wrappers": ["error"],
|
||||||
"skipComments": false,
|
"no-obj-calls": ["error"],
|
||||||
"skipRegExps": false,
|
"no-octal": ["error"],
|
||||||
"skipStrings": false,
|
"no-octal-escape": ["error"],
|
||||||
"skipTemplates": false
|
"no-param-reassign": ["error"],
|
||||||
}
|
"no-path-concat": ["error"],
|
||||||
],
|
"no-plusplus": [
|
||||||
"no-iterator": ["error"],
|
"error",
|
||||||
"no-label-var": ["error"],
|
{
|
||||||
"no-labels": ["error"],
|
allowForLoopAfterthoughts: true,
|
||||||
"no-lone-blocks": ["error"],
|
},
|
||||||
"no-lonely-if": ["error"],
|
],
|
||||||
"no-loop-func": ["error"],
|
"no-process-env": ["error"],
|
||||||
"no-magic-numbers": [
|
"no-process-exit": ["error"],
|
||||||
"error",
|
"no-proto": ["error"],
|
||||||
{
|
"no-prototype-builtins": ["error"],
|
||||||
"ignore": [
|
"no-redeclare": ["error"],
|
||||||
-1,
|
"no-regex-spaces": ["error"],
|
||||||
0,
|
"no-restricted-globals": ["error"],
|
||||||
1
|
"no-restricted-imports": ["error"],
|
||||||
],
|
"no-restricted-modules": ["error"],
|
||||||
"ignoreArrayIndexes": true
|
"no-restricted-properties": [
|
||||||
}
|
"error",
|
||||||
],
|
{
|
||||||
"no-mixed-operators": ["error"],
|
message: "'log' is too general, use an appropriate level when logging.",
|
||||||
"no-mixed-requires": ["error"],
|
object: "console",
|
||||||
"no-mixed-spaces-and-tabs": ["error"],
|
property: "log",
|
||||||
"no-multi-assign": ["error"],
|
},
|
||||||
"no-multi-spaces": ["error"],
|
],
|
||||||
"no-multi-str": ["error"],
|
"no-restricted-syntax": ["error"],
|
||||||
"no-multiple-empty-lines": [
|
"no-return-assign": ["error"],
|
||||||
"error",
|
"no-return-await": ["error"],
|
||||||
{
|
"no-script-url": ["error"],
|
||||||
"max": 1
|
"no-self-assign": [
|
||||||
}
|
"error",
|
||||||
],
|
{
|
||||||
"no-native-reassign": ["error"],
|
props: false,
|
||||||
"no-negated-condition": ["error"],
|
},
|
||||||
"no-negated-in-lhs": ["error"],
|
],
|
||||||
"no-nested-ternary": ["error"],
|
"no-self-compare": ["error"],
|
||||||
"no-new": ["error"],
|
"no-sequences": ["error"],
|
||||||
"no-new-func": ["error"],
|
"no-shadow": ["error"],
|
||||||
"no-new-object": ["error"],
|
"no-shadow-restricted-names": ["error"],
|
||||||
"no-new-require": ["error"],
|
"no-spaced-func": ["error"],
|
||||||
"no-new-symbol": ["error"],
|
"no-sparse-arrays": ["error"],
|
||||||
"no-new-wrappers": ["error"],
|
"no-sync": ["error"],
|
||||||
"no-obj-calls": ["error"],
|
"no-tabs": ["error"],
|
||||||
"no-octal": ["error"],
|
"no-template-curly-in-string": ["error"],
|
||||||
"no-octal-escape": ["error"],
|
"no-ternary": ["off"],
|
||||||
"no-param-reassign": ["error"],
|
"no-this-before-super": ["error"],
|
||||||
"no-path-concat": ["error"],
|
"no-throw-literal": ["error"],
|
||||||
"no-plusplus": [
|
"no-trailing-spaces": ["error"],
|
||||||
"error",
|
"no-undef": ["error"],
|
||||||
{
|
"no-undef-init": ["error"],
|
||||||
"allowForLoopAfterthoughts": true
|
"no-undefined": ["error"],
|
||||||
}
|
"no-underscore-dangle": ["error"],
|
||||||
],
|
"no-unexpected-multiline": ["error"],
|
||||||
"no-process-env": ["error"],
|
"no-unmodified-loop-condition": ["error"],
|
||||||
"no-process-exit": ["error"],
|
"no-unneeded-ternary": ["error"],
|
||||||
"no-proto": ["error"],
|
"no-unreachable": ["error"],
|
||||||
"no-prototype-builtins": ["error"],
|
"no-unsafe-finally": ["error"],
|
||||||
"no-redeclare": ["error"],
|
"no-unsafe-negation": ["error"],
|
||||||
"no-regex-spaces": ["error"],
|
"no-unused-expressions": ["error"],
|
||||||
"no-restricted-globals": ["error"],
|
"no-unused-labels": ["error"],
|
||||||
"no-restricted-imports": ["error"],
|
"no-unused-vars": ["error"],
|
||||||
"no-restricted-modules": ["error"],
|
"no-use-before-define": ["error"],
|
||||||
"no-restricted-properties": [
|
"no-useless-call": ["error"],
|
||||||
"error",
|
"no-useless-computed-key": ["error"],
|
||||||
{
|
"no-useless-concat": ["error"],
|
||||||
"message": "'log' is too general, use an appropriate level when logging.",
|
"no-useless-constructor": ["error"],
|
||||||
"object": "console",
|
"no-useless-escape": ["error"],
|
||||||
"property": "log"
|
"no-useless-rename": [
|
||||||
}
|
"error",
|
||||||
],
|
{
|
||||||
"no-restricted-syntax": ["error"],
|
ignoreDestructuring: false,
|
||||||
"no-return-assign": ["error"],
|
ignoreExport: false,
|
||||||
"no-return-await": ["error"],
|
ignoreImport: false,
|
||||||
"no-script-url": ["error"],
|
},
|
||||||
"no-self-assign": [
|
],
|
||||||
"error",
|
"no-useless-return": ["error"],
|
||||||
{
|
"no-var": ["error"],
|
||||||
"props": false
|
"no-void": ["error"],
|
||||||
}
|
"no-warning-comments": ["error"],
|
||||||
],
|
"no-whitespace-before-property": ["error"],
|
||||||
"no-self-compare": ["error"],
|
"no-with": ["error"],
|
||||||
"no-sequences": ["error"],
|
"nonblock-statement-body-position": ["error", "below"],
|
||||||
"no-shadow": ["error"],
|
"object-curly-newline": ["error"],
|
||||||
"no-shadow-restricted-names": ["error"],
|
"object-curly-spacing": ["error"],
|
||||||
"no-spaced-func": ["error"],
|
"object-property-newline": ["error"],
|
||||||
"no-sparse-arrays": ["error"],
|
"object-shorthand": ["error"],
|
||||||
"no-sync": ["error"],
|
"one-var": ["off"],
|
||||||
"no-tabs": ["error"],
|
"one-var-declaration-per-line": ["error"],
|
||||||
"no-template-curly-in-string": ["error"],
|
"operator-assignment": ["error"],
|
||||||
"no-ternary": ["off"],
|
"operator-linebreak": ["error", "none"],
|
||||||
"no-this-before-super": ["error"],
|
"padded-blocks": ["off"],
|
||||||
"no-throw-literal": ["error"],
|
"padding-line-between-statements": ["error"],
|
||||||
"no-trailing-spaces": ["error"],
|
"prefer-arrow-callback": ["error"],
|
||||||
"no-undef": ["error"],
|
"prefer-const": ["error"],
|
||||||
"no-undef-init": ["error"],
|
"prefer-destructuring": ["off"],
|
||||||
"no-undefined": ["error"],
|
"prefer-numeric-literals": ["error"],
|
||||||
"no-underscore-dangle": ["error"],
|
"prefer-promise-reject-errors": ["off"],
|
||||||
"no-unexpected-multiline": ["error"],
|
"prefer-reflect": ["error"],
|
||||||
"no-unmodified-loop-condition": ["error"],
|
"prefer-rest-params": ["error"],
|
||||||
"no-unneeded-ternary": ["error"],
|
"prefer-spread": ["error"],
|
||||||
"no-unreachable": ["error"],
|
"prefer-template": ["error"],
|
||||||
"no-unsafe-finally": ["error"],
|
"quote-props": ["error"],
|
||||||
"no-unsafe-negation": ["error"],
|
quotes: ["error"],
|
||||||
"no-unused-expressions": ["error"],
|
radix: ["error", "as-needed"],
|
||||||
"no-unused-labels": ["error"],
|
"require-await": ["error"],
|
||||||
"no-unused-vars": ["error"],
|
"require-jsdoc": ["off"],
|
||||||
"no-use-before-define": ["error"],
|
"require-yield": ["error"],
|
||||||
"no-useless-call": ["error"],
|
"rest-spread-spacing": ["error", "never"],
|
||||||
"no-useless-computed-key": ["error"],
|
semi: ["error"],
|
||||||
"no-useless-concat": ["error"],
|
"semi-spacing": ["error"],
|
||||||
"no-useless-constructor": ["error"],
|
"semi-style": ["error", "last"],
|
||||||
"no-useless-escape": ["error"],
|
"sort-imports": ["error"],
|
||||||
"no-useless-rename": [
|
"sort-keys": ["error"],
|
||||||
"error",
|
"sort-vars": ["error"],
|
||||||
{
|
"space-before-blocks": ["error"],
|
||||||
"ignoreDestructuring": false,
|
"space-before-function-paren": ["off"],
|
||||||
"ignoreExport": false,
|
"space-in-parens": ["error"],
|
||||||
"ignoreImport": false
|
"space-infix-ops": ["error"],
|
||||||
}
|
"space-unary-ops": ["error"],
|
||||||
],
|
"spaced-comment": ["error"],
|
||||||
"no-useless-return": ["error"],
|
strict: ["error"],
|
||||||
"no-var": ["error"],
|
"switch-colon-spacing": [
|
||||||
"no-void": ["error"],
|
"error",
|
||||||
"no-warning-comments": ["error"],
|
{
|
||||||
"no-whitespace-before-property": ["error"],
|
after: true,
|
||||||
"no-with": ["error"],
|
before: false,
|
||||||
"nonblock-statement-body-position": [
|
},
|
||||||
"error",
|
],
|
||||||
"below"
|
"symbol-description": ["error"],
|
||||||
],
|
"template-curly-spacing": ["error"],
|
||||||
"object-curly-newline": ["error"],
|
"template-tag-spacing": ["error"],
|
||||||
"object-curly-spacing": ["error"],
|
"unicode-bom": ["error", "never"],
|
||||||
"object-property-newline": ["error"],
|
"use-isnan": ["error"],
|
||||||
"object-shorthand": ["error"],
|
"valid-jsdoc": ["error"],
|
||||||
"one-var": ["off"],
|
"valid-typeof": ["error"],
|
||||||
"one-var-declaration-per-line": ["error"],
|
"vars-on-top": ["error"],
|
||||||
"operator-assignment": ["error"],
|
"wrap-iife": ["error", "any"],
|
||||||
"operator-linebreak": [
|
"wrap-regex": ["error"],
|
||||||
"error",
|
"yield-star-spacing": ["error", "before"],
|
||||||
"none"
|
yoda: ["error", "never"],
|
||||||
],
|
},
|
||||||
"padded-blocks": ["off"],
|
|
||||||
"padding-line-between-statements": ["error"],
|
|
||||||
"prefer-arrow-callback": ["error"],
|
|
||||||
"prefer-const": ["error"],
|
|
||||||
"prefer-destructuring": ["off"],
|
|
||||||
"prefer-numeric-literals": ["error"],
|
|
||||||
"prefer-promise-reject-errors": ["off"],
|
|
||||||
"prefer-reflect": ["error"],
|
|
||||||
"prefer-rest-params": ["error"],
|
|
||||||
"prefer-spread": ["error"],
|
|
||||||
"prefer-template": ["error"],
|
|
||||||
"quote-props": ["error"],
|
|
||||||
"quotes": ["error"],
|
|
||||||
"radix": [
|
|
||||||
"error",
|
|
||||||
"as-needed"
|
|
||||||
],
|
|
||||||
"require-await": ["error"],
|
|
||||||
"require-jsdoc": ["off"],
|
|
||||||
"require-yield": ["error"],
|
|
||||||
"rest-spread-spacing": [
|
|
||||||
"error",
|
|
||||||
"never"
|
|
||||||
],
|
|
||||||
"semi": ["error"],
|
|
||||||
"semi-spacing": ["error"],
|
|
||||||
"semi-style": [
|
|
||||||
"error",
|
|
||||||
"last"
|
|
||||||
],
|
|
||||||
"sort-imports": ["error"],
|
|
||||||
"sort-keys": ["error"],
|
|
||||||
"sort-vars": ["error"],
|
|
||||||
"space-before-blocks": ["error"],
|
|
||||||
"space-before-function-paren": ["off"],
|
|
||||||
"space-in-parens": ["error"],
|
|
||||||
"space-infix-ops": ["error"],
|
|
||||||
"space-unary-ops": ["error"],
|
|
||||||
"spaced-comment": ["error"],
|
|
||||||
"strict": ["error"],
|
|
||||||
"switch-colon-spacing": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"after": true,
|
|
||||||
"before": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"symbol-description": ["error"],
|
|
||||||
"template-curly-spacing": ["error"],
|
|
||||||
"template-tag-spacing": ["error"],
|
|
||||||
"unicode-bom": [
|
|
||||||
"error",
|
|
||||||
"never"
|
|
||||||
],
|
|
||||||
"use-isnan": ["error"],
|
|
||||||
"valid-jsdoc": ["error"],
|
|
||||||
"valid-typeof": ["error"],
|
|
||||||
"vars-on-top": ["error"],
|
|
||||||
"wrap-iife": [
|
|
||||||
"error",
|
|
||||||
"any"
|
|
||||||
],
|
|
||||||
"wrap-regex": ["error"],
|
|
||||||
"yield-star-spacing": [
|
|
||||||
"error",
|
|
||||||
"before"
|
|
||||||
],
|
|
||||||
"yoda": [
|
|
||||||
"error",
|
|
||||||
"never"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
@ -8,66 +8,74 @@ const path = require("path");
|
|||||||
const exec = require("child_process").exec;
|
const exec = require("child_process").exec;
|
||||||
const semver = require("./semver");
|
const semver = require("./semver");
|
||||||
|
|
||||||
const getPackageJson = () => new Promise((resolve, reject) => {
|
const getPackageJson = () =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
/* eslint-disable-next-line global-require */
|
/* eslint-disable-next-line global-require */
|
||||||
resolve(require(path.resolve(process.cwd(), "package.json")));
|
resolve(require(path.resolve(process.cwd(), "package.json")));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const getEngines = (data) => new Promise((resolve, reject) => {
|
const getEngines = (data) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
let versions = null;
|
let versions = null;
|
||||||
|
|
||||||
if (data.engines) {
|
if (data.engines) {
|
||||||
versions = data.engines;
|
versions = data.engines;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (versions) {
|
if (versions) {
|
||||||
resolve(versions);
|
resolve(versions);
|
||||||
} else {
|
} else {
|
||||||
reject("Missing or improper 'engines' property in 'package.json'");
|
reject("Missing or improper 'engines' property in 'package.json'");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkNpmVersion = (engines) => new Promise((resolve, reject) => {
|
const checkNpmVersion = (engines) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
exec("npm -v", (error, stdout, stderr) => {
|
exec("npm -v", (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(`Unable to find NPM version\n${stderr}`);
|
reject(`Unable to find NPM version\n${stderr}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const npmVersion = stdout.trim();
|
const npmVersion = stdout.trim();
|
||||||
const engineVersion = engines.npm || ">=0";
|
const engineVersion = engines.npm || ">=0";
|
||||||
|
|
||||||
if (semver.satisfies(npmVersion, engineVersion)) {
|
if (semver.satisfies(npmVersion, engineVersion)) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
reject(`Incorrect npm version\n'package.json' specifies "${engineVersion}", you are currently running "${npmVersion}".`);
|
reject(
|
||||||
}
|
`Incorrect npm version\n'package.json' specifies "${engineVersion}", you are currently running "${npmVersion}".`,
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkNodeVersion = (engines) => new Promise((resolve, reject) => {
|
const checkNodeVersion = (engines) =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
const nodeVersion = process.version.substring(1);
|
const nodeVersion = process.version.substring(1);
|
||||||
|
|
||||||
if (semver.satisfies(nodeVersion, engines.node)) {
|
if (semver.satisfies(nodeVersion, engines.node)) {
|
||||||
resolve(engines);
|
resolve(engines);
|
||||||
} else {
|
} else {
|
||||||
reject(`Incorrect node version\n'package.json' specifies "${engines.node}", you are currently running "${process.version}".`);
|
reject(
|
||||||
|
`Incorrect node version\n'package.json' specifies "${engines.node}", you are currently running "${process.version}".`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getPackageJson()
|
getPackageJson()
|
||||||
.then(getEngines)
|
.then(getEngines)
|
||||||
.then(checkNodeVersion)
|
.then(checkNodeVersion)
|
||||||
.then(checkNpmVersion)
|
.then(checkNpmVersion)
|
||||||
.then(
|
.then(
|
||||||
() => true,
|
() => true,
|
||||||
(error) => {
|
(error) => {
|
||||||
// Specifically disable these as the error message gets lost in the normal unhandled output.
|
// Specifically disable these as the error message gets lost in the normal unhandled output.
|
||||||
/* eslint-disable no-console, no-process-exit */
|
/* eslint-disable no-console, no-process-exit */
|
||||||
console.error(error);
|
console.error(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,8 @@ export function BlackOpList(props: IProps): React.ReactElement {
|
|||||||
});
|
});
|
||||||
|
|
||||||
blackops = blackops.filter(
|
blackops = blackops.filter(
|
||||||
(blackop: BlackOperation, i: number) => !(
|
(blackop: BlackOperation, i: number) =>
|
||||||
|
!(
|
||||||
props.bladeburner.blackops[blackops[i].name] == null &&
|
props.bladeburner.blackops[blackops[i].name] == null &&
|
||||||
i !== 0 &&
|
i !== 0 &&
|
||||||
props.bladeburner.blackops[blackops[i - 1].name] == null
|
props.bladeburner.blackops[blackops[i - 1].name] == null
|
||||||
|
@ -62,7 +62,8 @@ export function CityTabs(props: IProps): React.ReactElement {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{Object.values(props.division.offices).map(
|
{Object.values(props.division.offices).map(
|
||||||
(office: OfficeSpace | 0) => office !== 0 && (
|
(office: OfficeSpace | 0) =>
|
||||||
|
office !== 0 && (
|
||||||
<CityTab
|
<CityTab
|
||||||
current={city === office.loc}
|
current={city === office.loc}
|
||||||
key={office.loc}
|
key={office.loc}
|
||||||
|
@ -20,7 +20,8 @@ function ExpandButton(props: IExpandButtonProps): React.ReactElement {
|
|||||||
const allIndustries = Object.keys(Industries).sort();
|
const allIndustries = Object.keys(Industries).sort();
|
||||||
const possibleIndustries = allIndustries
|
const possibleIndustries = allIndustries
|
||||||
.filter(
|
.filter(
|
||||||
(industryType: string) => props.corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,
|
(industryType: string) =>
|
||||||
|
props.corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,
|
||||||
)
|
)
|
||||||
.sort();
|
.sort();
|
||||||
if (possibleIndustries.length === 0) return <></>;
|
if (possibleIndustries.length === 0) return <></>;
|
||||||
|
@ -17,7 +17,8 @@ export function NewIndustryPopup(props: IProps): React.ReactElement {
|
|||||||
const allIndustries = Object.keys(Industries).sort();
|
const allIndustries = Object.keys(Industries).sort();
|
||||||
const possibleIndustries = allIndustries
|
const possibleIndustries = allIndustries
|
||||||
.filter(
|
.filter(
|
||||||
(industryType: string) => props.corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,
|
(industryType: string) =>
|
||||||
|
props.corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,
|
||||||
)
|
)
|
||||||
.sort();
|
.sort();
|
||||||
const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : "");
|
const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : "");
|
||||||
|
@ -95,7 +95,9 @@ function BulkPurchase(props: IProps): React.ReactElement {
|
|||||||
style={{ margin: "5px" }}
|
style={{ margin: "5px" }}
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
/>
|
/>
|
||||||
<button className="std-button" onClick={bulkPurchase}>Confirm Bulk Purchase</button>
|
<button className="std-button" onClick={bulkPurchase}>
|
||||||
|
Confirm Bulk Purchase
|
||||||
|
</button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ export function DonateOption(props: IProps): React.ReactElement {
|
|||||||
const amt = numeralWrapper.parseMoney(event.target.value);
|
const amt = numeralWrapper.parseMoney(event.target.value);
|
||||||
if (event.target.value === "" || isNaN(amt)) setDonateAmt(null);
|
if (event.target.value === "" || isNaN(amt)) setDonateAmt(null);
|
||||||
else setDonateAmt(amt);
|
else setDonateAmt(amt);
|
||||||
console.log('set')
|
console.log("set");
|
||||||
}
|
}
|
||||||
|
|
||||||
function donate(): void {
|
function donate(): void {
|
||||||
|
@ -66,9 +66,9 @@ const GangNames = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export function FactionRoot(props: IProps): React.ReactElement {
|
export function FactionRoot(props: IProps): React.ReactElement {
|
||||||
const setRerender = useState(false)[1];
|
const setRerender = useState(false)[1];
|
||||||
function rerender(): void {
|
function rerender(): void {
|
||||||
setRerender((old) => !old);
|
setRerender((old) => !old);
|
||||||
}
|
}
|
||||||
const faction = props.faction;
|
const faction = props.faction;
|
||||||
|
|
||||||
@ -91,7 +91,6 @@ export function FactionRoot(props: IProps): React.ReactElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Route to the main faction page
|
// Route to the main faction page
|
||||||
function routeToMain(): void {
|
function routeToMain(): void {
|
||||||
setPurchasingAugs(false);
|
setPurchasingAugs(false);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* React component for general information about the faction. This includes the
|
* React component for general information about the faction. This includes the
|
||||||
* factions "motto", reputation, favor, and gameplay instructions
|
* factions "motto", reputation, favor, and gameplay instructions
|
||||||
*/
|
*/
|
||||||
import React, {useState, useEffect} from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
|
|
||||||
import { Faction } from "../../Faction/Faction";
|
import { Faction } from "../../Faction/Faction";
|
||||||
import { FactionInfo } from "../../Faction/FactionInfo";
|
import { FactionInfo } from "../../Faction/FactionInfo";
|
||||||
@ -34,7 +34,7 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
export function Info(props: IProps): React.ReactElement {
|
export function Info(props: IProps): React.ReactElement {
|
||||||
const setRerender = useState(false)[1];
|
const setRerender = useState(false)[1];
|
||||||
function rerender(): void {
|
function rerender(): void {
|
||||||
setRerender((old) => !old);
|
setRerender((old) => !old);
|
||||||
}
|
}
|
||||||
|
@ -225,8 +225,8 @@ export class GangMember {
|
|||||||
def: this.calculateAscensionMult(this.def_asc_points),
|
def: this.calculateAscensionMult(this.def_asc_points),
|
||||||
dex: this.calculateAscensionMult(this.dex_asc_points),
|
dex: this.calculateAscensionMult(this.dex_asc_points),
|
||||||
agi: this.calculateAscensionMult(this.agi_asc_points),
|
agi: this.calculateAscensionMult(this.agi_asc_points),
|
||||||
cha: this.calculateAscensionMult(this.cha_asc_points)
|
cha: this.calculateAscensionMult(this.cha_asc_points),
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getAscensionMultsAfterAscend(): IMults {
|
getAscensionMultsAfterAscend(): IMults {
|
||||||
@ -238,7 +238,7 @@ export class GangMember {
|
|||||||
dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),
|
dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),
|
||||||
agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),
|
agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),
|
||||||
cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),
|
cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getAscensionResults(): IMults {
|
getAscensionResults(): IMults {
|
||||||
@ -252,7 +252,7 @@ export class GangMember {
|
|||||||
dex: postAscend.dex / preAscend.dex,
|
dex: postAscend.dex / preAscend.dex,
|
||||||
agi: postAscend.agi / preAscend.agi,
|
agi: postAscend.agi / preAscend.agi,
|
||||||
cha: postAscend.cha / preAscend.cha,
|
cha: postAscend.cha / preAscend.cha,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ascend(): IAscensionResult {
|
ascend(): IAscensionResult {
|
||||||
|
@ -74,17 +74,23 @@ export function AscensionPopup(props: IProps): React.ReactElement {
|
|||||||
<br />
|
<br />
|
||||||
In return, they will gain the following permanent boost to stat multipliers:
|
In return, they will gain the following permanent boost to stat multipliers:
|
||||||
<br />
|
<br />
|
||||||
Hacking: x{numeralWrapper.format(preAscend.hack, "0.000")} => x{numeralWrapper.format(postAscend.hack, "0.000")}
|
Hacking: x{numeralWrapper.format(preAscend.hack, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.hack, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
Strength: x{numeralWrapper.format(preAscend.str, "0.000")} => x{numeralWrapper.format(postAscend.str, "0.000")}
|
Strength: x{numeralWrapper.format(preAscend.str, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.str, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
Defense: x{numeralWrapper.format(preAscend.def, "0.000")} => x{numeralWrapper.format(postAscend.def, "0.000")}
|
Defense: x{numeralWrapper.format(preAscend.def, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.def, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
Dexterity: x{numeralWrapper.format(preAscend.dex, "0.000")} => x{numeralWrapper.format(postAscend.dex, "0.000")}
|
Dexterity: x{numeralWrapper.format(preAscend.dex, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.dex, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
Agility: x{numeralWrapper.format(preAscend.agi, "0.000")} => x{numeralWrapper.format(postAscend.agi, "0.000")}
|
Agility: x{numeralWrapper.format(preAscend.agi, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.agi, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
Charisma: x{numeralWrapper.format(preAscend.cha, "0.000")} => x{numeralWrapper.format(postAscend.cha, "0.000")}
|
Charisma: x{numeralWrapper.format(preAscend.cha, "0.000")} => x
|
||||||
|
{numeralWrapper.format(postAscend.cha, "0.000")}
|
||||||
<br />
|
<br />
|
||||||
</pre>
|
</pre>
|
||||||
<button className="std-button" onClick={confirm}>
|
<button className="std-button" onClick={confirm}>
|
||||||
|
@ -13,21 +13,17 @@ import { CoresButton } from "./CoresButton";
|
|||||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||||
import { getPurchaseServerCost } from "../../Server/ServerPurchases";
|
import { getPurchaseServerCost } from "../../Server/ServerPurchases";
|
||||||
|
|
||||||
|
|
||||||
import { StdButton } from "../../ui/React/StdButton";
|
import { StdButton } from "../../ui/React/StdButton";
|
||||||
import { Money } from "../../ui/React/Money";
|
import { Money } from "../../ui/React/Money";
|
||||||
import { createPopup } from "../../ui/React/createPopup";
|
import { createPopup } from "../../ui/React/createPopup";
|
||||||
import { PurchaseServerPopup } from "./PurchaseServerPopup";
|
import { PurchaseServerPopup } from "./PurchaseServerPopup";
|
||||||
|
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
loc: Location;
|
loc: Location;
|
||||||
p: IPlayer;
|
p: IPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function TechVendorLocation(props: IProps): React.ReactElement {
|
export function TechVendorLocation(props: IProps): React.ReactElement {
|
||||||
|
|
||||||
|
|
||||||
const setRerender = useState(false)[1];
|
const setRerender = useState(false)[1];
|
||||||
function rerender(): void {
|
function rerender(): void {
|
||||||
setRerender((old) => !old);
|
setRerender((old) => !old);
|
||||||
@ -40,7 +36,7 @@ export function TechVendorLocation(props: IProps): React.ReactElement {
|
|||||||
cost: cost,
|
cost: cost,
|
||||||
p: p,
|
p: p,
|
||||||
popupId: popupId,
|
popupId: popupId,
|
||||||
rerender: rerender
|
rerender: rerender,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,9 +60,11 @@ const SortFunctions: {
|
|||||||
Dexterity: (a: Resleeve, b: Resleeve): number => a.dexterity - b.dexterity,
|
Dexterity: (a: Resleeve, b: Resleeve): number => a.dexterity - b.dexterity,
|
||||||
Agility: (a: Resleeve, b: Resleeve): number => a.agility - b.agility,
|
Agility: (a: Resleeve, b: Resleeve): number => a.agility - b.agility,
|
||||||
Charisma: (a: Resleeve, b: Resleeve): number => a.charisma - b.charisma,
|
Charisma: (a: Resleeve, b: Resleeve): number => a.charisma - b.charisma,
|
||||||
AverageCombatStats: (a: Resleeve, b: Resleeve): number => getAverage(a.strength, a.defense, a.dexterity, a.agility) -
|
AverageCombatStats: (a: Resleeve, b: Resleeve): number =>
|
||||||
|
getAverage(a.strength, a.defense, a.dexterity, a.agility) -
|
||||||
getAverage(b.strength, b.defense, b.dexterity, b.agility),
|
getAverage(b.strength, b.defense, b.dexterity, b.agility),
|
||||||
AverageAllStats: (a: Resleeve, b: Resleeve): number => getAverage(a.hacking_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) -
|
AverageAllStats: (a: Resleeve, b: Resleeve): number =>
|
||||||
|
getAverage(a.hacking_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) -
|
||||||
getAverage(b.hacking_skill, b.strength, b.defense, b.dexterity, b.agility, b.charisma),
|
getAverage(b.hacking_skill, b.strength, b.defense, b.dexterity, b.agility, b.charisma),
|
||||||
TotalNumAugmentations: (a: Resleeve, b: Resleeve): number => a.augmentations.length - b.augmentations.length,
|
TotalNumAugmentations: (a: Resleeve, b: Resleeve): number => a.augmentations.length - b.augmentations.length,
|
||||||
};
|
};
|
||||||
|
@ -183,8 +183,10 @@ const canDo: {
|
|||||||
"Work for Company": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,
|
"Work for Company": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,
|
||||||
"Work for Faction": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,
|
"Work for Faction": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,
|
||||||
"Commit Crime": () => true,
|
"Commit Crime": () => true,
|
||||||
"Take University Course": (player: IPlayer, sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
"Take University Course": (player: IPlayer, sleeve: Sleeve) =>
|
||||||
"Workout at Gym": (player: IPlayer, sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||||
|
"Workout at Gym": (player: IPlayer, sleeve: Sleeve) =>
|
||||||
|
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||||
"Shock Recovery": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,
|
"Shock Recovery": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,
|
||||||
Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,
|
Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,
|
||||||
};
|
};
|
||||||
@ -229,7 +231,8 @@ export function TaskSelector(props: IProps): React.ReactElement {
|
|||||||
const [s1, setS1] = useState(abc[1]);
|
const [s1, setS1] = useState(abc[1]);
|
||||||
const [s2, setS2] = useState(abc[2]);
|
const [s2, setS2] = useState(abc[2]);
|
||||||
|
|
||||||
const validActions = Object.keys(canDo).filter((k) => (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),
|
const validActions = Object.keys(canDo).filter((k) =>
|
||||||
|
(canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),
|
||||||
);
|
);
|
||||||
|
|
||||||
const detailsF = tasks[s0];
|
const detailsF = tasks[s0];
|
||||||
|
@ -25,7 +25,7 @@ import { WorkerScript } from "../../Netscript/WorkerScript";
|
|||||||
import { Settings } from "../../Settings/Settings";
|
import { Settings } from "../../Settings/Settings";
|
||||||
import { iTutorialNextStep, ITutorial, iTutorialSteps } from "../../InteractiveTutorial";
|
import { iTutorialNextStep, ITutorial, iTutorialSteps } from "../../InteractiveTutorial";
|
||||||
|
|
||||||
let loaded=false;
|
let loaded = false;
|
||||||
let symbols: string[] = [];
|
let symbols: string[] = [];
|
||||||
(function () {
|
(function () {
|
||||||
const ns = NetscriptFunctions({} as WorkerScript);
|
const ns = NetscriptFunctions({} as WorkerScript);
|
||||||
@ -310,7 +310,7 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
});
|
});
|
||||||
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
||||||
monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, "netscript.d.ts");
|
||||||
loaded=true
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -403,7 +403,7 @@ export class Terminal implements ITerminal {
|
|||||||
if (player.hasProgram(Programs.AutoLink.name)) {
|
if (player.hasProgram(Programs.AutoLink.name)) {
|
||||||
this.append(new Link(titleDashes, s.hostname));
|
this.append(new Link(titleDashes, s.hostname));
|
||||||
} else {
|
} else {
|
||||||
this.print(titleDashes+s.hostname);
|
this.print(titleDashes + s.hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dashes = titleDashes + "--";
|
const dashes = titleDashes + "--";
|
||||||
|
@ -93,7 +93,8 @@ export function TerminalRoot({ terminal, router, player }: IProps): React.ReactE
|
|||||||
if (item instanceof Link)
|
if (item instanceof Link)
|
||||||
return (
|
return (
|
||||||
<ListItem key={i} classes={{ root: classes.nopadding }}>
|
<ListItem key={i} classes={{ root: classes.nopadding }}>
|
||||||
<Typography>{item.dashes}> </Typography><MuiLink
|
<Typography>{item.dashes}> </Typography>
|
||||||
|
<MuiLink
|
||||||
classes={{ root: classes.preformatted }}
|
classes={{ root: classes.preformatted }}
|
||||||
color={"secondary"}
|
color={"secondary"}
|
||||||
paragraph={false}
|
paragraph={false}
|
||||||
|
@ -157,7 +157,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
d += " [\n";
|
d += " [\n";
|
||||||
d += n
|
d += n
|
||||||
.map(
|
.map(
|
||||||
(line: number[]) => " [" +
|
(line: number[]) =>
|
||||||
|
" [" +
|
||||||
line.map((x: number) => `${x}`.padStart(2, " ")).join(",") +
|
line.map((x: number) => `${x}`.padStart(2, " ")).join(",") +
|
||||||
"]",
|
"]",
|
||||||
)
|
)
|
||||||
|
@ -5,24 +5,25 @@ import Button from "@mui/material/Button";
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
confirmationText: string;
|
confirmationText: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ConfirmationModal(props: IProps): React.ReactElement {
|
export function ConfirmationModal(props: IProps): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Modal open={props.open} onClose={props.onClose}>
|
<Modal open={props.open} onClose={props.onClose}>
|
||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>{props.confirmationText}</Typography>
|
||||||
{props.confirmationText}
|
<Button
|
||||||
</Typography>
|
onClick={() => {
|
||||||
<Button onClick={() => {
|
|
||||||
props.onConfirm();
|
props.onConfirm();
|
||||||
}}>Confirm</Button>
|
}}
|
||||||
</>
|
>
|
||||||
</Modal>
|
Confirm
|
||||||
);
|
</Button>
|
||||||
}
|
</>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Button, ButtonProps } from "@mui/material";
|
import { Button, ButtonProps } from "@mui/material";
|
||||||
import makeStyles from '@mui/styles/makeStyles';
|
import makeStyles from "@mui/styles/makeStyles";
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
// Tries to emulate StdButton in buttons.scss
|
// Tries to emulate StdButton in buttons.scss
|
||||||
root: {
|
root: {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Paper, PaperProps } from "@mui/material";
|
import { Paper, PaperProps } from "@mui/material";
|
||||||
|
|
||||||
import makeStyles from '@mui/styles/makeStyles';
|
import makeStyles from "@mui/styles/makeStyles";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
root: {
|
root: {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { TextField, TextFieldProps } from "@mui/material";
|
import { TextField, TextFieldProps } from "@mui/material";
|
||||||
|
|
||||||
import makeStyles from '@mui/styles/makeStyles';
|
import makeStyles from "@mui/styles/makeStyles";
|
||||||
|
|
||||||
const backgroundColorStyles = {
|
const backgroundColorStyles = {
|
||||||
backgroundColor: "rgba(57, 54, 54, 0.9)",
|
backgroundColor: "rgba(57, 54, 54, 0.9)",
|
||||||
|
@ -26,7 +26,7 @@ export function Overview({ children }: IProps): React.ReactElement {
|
|||||||
if (router.page() === Page.BitVerse || router.page() === Page.HackingMission || router.page() === Page.Loading)
|
if (router.page() === Page.BitVerse || router.page() === Page.HackingMission || router.page() === Page.Loading)
|
||||||
return <></>;
|
return <></>;
|
||||||
let icon;
|
let icon;
|
||||||
if (open){
|
if (open) {
|
||||||
icon = <VisibilityOffIcon color="primary" />;
|
icon = <VisibilityOffIcon color="primary" />;
|
||||||
} else {
|
} else {
|
||||||
icon = <VisibilityIcon color="primary" />;
|
icon = <VisibilityIcon color="primary" />;
|
||||||
|
@ -45,7 +45,14 @@ export function StdButton(props: IStdButtonProps): React.ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button className={className} id={props.id} onClick={props.onClick} onKeyUp={props.onKeyUp} style={props.style} autoFocus={props.autoFocus}>
|
<button
|
||||||
|
className={className}
|
||||||
|
id={props.id}
|
||||||
|
onClick={props.onClick}
|
||||||
|
onKeyUp={props.onKeyUp}
|
||||||
|
style={props.style}
|
||||||
|
autoFocus={props.autoFocus}
|
||||||
|
>
|
||||||
{props.text}
|
{props.text}
|
||||||
{hasTooltip && tooltip}
|
{hasTooltip && tooltip}
|
||||||
</button>
|
</button>
|
||||||
|
@ -51,11 +51,7 @@ function ColorEditor({ name }: { name: string }): React.ReactElement {
|
|||||||
InputProps={{
|
InputProps={{
|
||||||
startAdornment: (
|
startAdornment: (
|
||||||
<>
|
<>
|
||||||
<ColorPicker
|
<ColorPicker hideTextfield value={color} onChange={onColorPickerChange} />
|
||||||
hideTextfield
|
|
||||||
value={color}
|
|
||||||
onChange={onColorPickerChange}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
endAdornment: (
|
endAdornment: (
|
||||||
|
@ -22,9 +22,9 @@ export function createStatusText(text: string): void {
|
|||||||
// Likely not needed due to clearTimeout, but just in case...
|
// Likely not needed due to clearTimeout, but just in case...
|
||||||
x = undefined;
|
x = undefined;
|
||||||
// reset the element's animation
|
// reset the element's animation
|
||||||
statusElement.style.animation = 'none';
|
statusElement.style.animation = "none";
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
statusElement.style.animation = '';
|
statusElement.style.animation = "";
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user