mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
Merge upstream
This commit is contained in:
commit
4b87616aad
@ -433,8 +433,8 @@ a:visited {
|
||||
position: absolute; /* Stay in place */
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 205px; /* Full height */
|
||||
padding: 5px;
|
||||
height: auto; /* Full height */
|
||||
padding: 8px;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
width: 19%;
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
@ -443,12 +443,18 @@ a:visited {
|
||||
}
|
||||
|
||||
#character-overview-text {
|
||||
padding: 4px;
|
||||
margin: 8px;
|
||||
color: #fff;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.character-stat-text {
|
||||
color: #fff;
|
||||
background-color: #444;
|
||||
}
|
||||
.character-stat-cell {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#character-overview-save-button,
|
||||
#character-overview-options-button {
|
||||
@include borderRadius(12px);
|
||||
@ -461,6 +467,10 @@ a:visited {
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.character-quick-options {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#character-overview-save-button:hover,
|
||||
#character-overview-save-button:focus,
|
||||
#character-overview-options-button:hover,
|
||||
@ -540,3 +550,11 @@ a:visited {
|
||||
.accordion-panel ul > li {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
/* override the global <span> styling */
|
||||
#active-scripts-total-production-active,
|
||||
#active-scripts-total-prod-aug-total,
|
||||
#active-scripts-total-prod-aug-avg {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
445
dist/engine.css
vendored
445
dist/engine.css
vendored
@ -1,14 +1,20 @@
|
||||
* {
|
||||
font-size: 16px;
|
||||
font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman"; }
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top; }
|
||||
|
||||
:root {
|
||||
--my-font-color: #6f3;
|
||||
--my-background-color: #000;
|
||||
--my-highlight-color: #fff; }
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
font-family: 'Lucida Console', 'Lucida Sans Unicode', 'Fira Mono', 'Consolas', 'Courier New', Courier, monospace, 'Times New Roman'; }
|
||||
|
||||
body {
|
||||
background-color: var(--my-background-color); }
|
||||
|
||||
@ -33,6 +39,18 @@ span {
|
||||
margin: 4px;
|
||||
padding: 4px; }
|
||||
|
||||
button[type="button"] {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
-o-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
padding: 0.5rem 1rem;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 10px;
|
||||
left: 50%; }
|
||||
|
||||
#entire-game-container {
|
||||
background-color: transparent; }
|
||||
|
||||
@ -106,7 +124,8 @@ tr:focus {
|
||||
border: 2px solid #fff; }
|
||||
|
||||
/* Make html links ("a" elements) nice looking buttons with this class */
|
||||
a:link, a:visited {
|
||||
a:link,
|
||||
a:visited {
|
||||
color: #fff; }
|
||||
|
||||
.a-link-button {
|
||||
@ -407,9 +426,9 @@ a:link, a:visited {
|
||||
/* Stay in place */
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 205px;
|
||||
height: auto;
|
||||
/* Full height */
|
||||
padding: 5px;
|
||||
padding: 8px;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
width: 19%;
|
||||
overflow: auto;
|
||||
@ -419,25 +438,33 @@ a:link, a:visited {
|
||||
z-index: 1; }
|
||||
|
||||
#character-overview-text {
|
||||
padding: 4px;
|
||||
margin: 8px;
|
||||
color: #fff;
|
||||
background-color: #444; }
|
||||
|
||||
.character-stat-text {
|
||||
color: #fff;
|
||||
background-color: #444; }
|
||||
|
||||
.character-stat-cell {
|
||||
text-align: right; }
|
||||
|
||||
#character-overview-save-button,
|
||||
#character-overview-options-button {
|
||||
color: #aaa;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
color: #aaa;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
height: 22px;
|
||||
background-color: #000; }
|
||||
|
||||
.character-quick-options {
|
||||
padding-top: 5px; }
|
||||
|
||||
#character-overview-save-button:hover,
|
||||
#character-overview-save-button:focus,
|
||||
#character-overview-options-button:hover,
|
||||
@ -510,6 +537,13 @@ a:link, a:visited {
|
||||
.accordion-panel ul > li {
|
||||
background-color: #555; }
|
||||
|
||||
/* override the global <span> styling */
|
||||
#active-scripts-total-production-active,
|
||||
#active-scripts-total-prod-aug-total,
|
||||
#active-scripts-total-prod-aug-avg {
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
#terminal-container {
|
||||
position: fixed;
|
||||
margin-left: 10%;
|
||||
@ -588,7 +622,7 @@ a:link, a:visited {
|
||||
padding-bottom: 6px;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
z-index: 1;
|
||||
font-family: 'Lucida Console', 'Lucida Sans Unicode', 'Fira Mono', 'Consolas', 'Courier New', Courier, monospace, 'Times New Roman'; }
|
||||
font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman"; }
|
||||
|
||||
.ace_line,
|
||||
.ace_line * {
|
||||
@ -636,6 +670,9 @@ a:link, a:visited {
|
||||
color: #fff; }
|
||||
|
||||
#script-editor-filename {
|
||||
-webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
background-color: #555;
|
||||
display: inline-block;
|
||||
float: center;
|
||||
@ -643,10 +680,7 @@ a:link, a:visited {
|
||||
color: #fff;
|
||||
margin: 4px;
|
||||
padding: 2px;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
-webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1); }
|
||||
border: 2px solid var(--my-highlight-color); }
|
||||
|
||||
#script-editor-status {
|
||||
float: left;
|
||||
@ -782,15 +816,15 @@ a:link, a:visited {
|
||||
margin-left: 5%; }
|
||||
|
||||
.active-scripts-button {
|
||||
color: #aaa;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
color: #aaa;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 4px;
|
||||
padding: 4px;
|
||||
background-color: #000; }
|
||||
@ -835,13 +869,13 @@ a:link, a:visited {
|
||||
display: inline-block; }
|
||||
|
||||
.hacknet-node {
|
||||
-webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
margin: 6px;
|
||||
padding: 6px;
|
||||
width: 34vw;
|
||||
border: 2px solid var(--my-highlight-color);
|
||||
-webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 0 16px rgba(0, 0, 0, 0.1); }
|
||||
border: 2px solid var(--my-highlight-color); }
|
||||
|
||||
.hacknet-node-container {
|
||||
display: inline-table; }
|
||||
@ -858,8 +892,7 @@ a:link, a:visited {
|
||||
margin: 0 4px;
|
||||
/* Don't want the vertical margin/padding, just left & right */
|
||||
padding: 0 4px;
|
||||
width: 48px;
|
||||
/* Four times font-size */ }
|
||||
width: 64px; }
|
||||
|
||||
.menu-page-text {
|
||||
width: 70vw; }
|
||||
@ -1097,19 +1130,19 @@ a:link, a:visited {
|
||||
margin: 10px; }
|
||||
|
||||
#work-in-progress-cancel-button {
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
color: #aaa;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
margin: 10px;
|
||||
padding: 5px;
|
||||
border-radius: 12px;
|
||||
border: 3px solid #fff;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000; }
|
||||
border: 3px solid #fff; }
|
||||
|
||||
#work-in-progress-cancel-button:hover,
|
||||
#work-in-progress-cancel-button:focus {
|
||||
@ -1202,16 +1235,16 @@ a:link, a:visited {
|
||||
padding: 10px; }
|
||||
|
||||
.dialog-box-close-button {
|
||||
float: right;
|
||||
color: #aaa;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000; }
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
float: right;
|
||||
color: #aaa;
|
||||
font-size: 20px;
|
||||
font-weight: bold; }
|
||||
|
||||
#log-box-close {
|
||||
position: fixed;
|
||||
@ -1271,18 +1304,18 @@ a:link, a:visited {
|
||||
width: 49%; }
|
||||
|
||||
#game-options-close-button {
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
color: #aaa;
|
||||
float: right;
|
||||
margin: 4px;
|
||||
padding: 4px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px #fff;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000; }
|
||||
font-weight: bold; }
|
||||
|
||||
#game-options-close-button:hover,
|
||||
#game-options-close-button:focus {
|
||||
@ -1317,9 +1350,8 @@ a:link, a:visited {
|
||||
background-color: #444;
|
||||
/* Fallback color */
|
||||
color: #fff; }
|
||||
|
||||
#interactive-tutorial-container > strong {
|
||||
background-color: #444; }
|
||||
#interactive-tutorial-container > strong {
|
||||
background-color: #444; }
|
||||
|
||||
#interactive-tutorial-text {
|
||||
padding: 4px;
|
||||
@ -1330,16 +1362,24 @@ a:link, a:visited {
|
||||
#interactive-tutorial-exit,
|
||||
#interactive-tutorial-next,
|
||||
#interactive-tutorial-back {
|
||||
color: #aaa;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
border-radius: 12px;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
-webkit-box-shadow: 1px 1px 3px #000;
|
||||
-moz-box-shadow: 1px 1px 3px #000;
|
||||
box-shadow: 1px 1px 3px #000;
|
||||
color: #aaa;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
background-color: #000; }
|
||||
#interactive-tutorial-exit:hover, #interactive-tutorial-exit:focus,
|
||||
#interactive-tutorial-next:hover,
|
||||
#interactive-tutorial-next:focus,
|
||||
#interactive-tutorial-back:hover,
|
||||
#interactive-tutorial-back:focus {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
cursor: pointer; }
|
||||
|
||||
#interactive-tutorial-exit {
|
||||
float: left; }
|
||||
@ -1351,15 +1391,17 @@ a:link, a:visited {
|
||||
#interactive-tutorial-next {
|
||||
float: right; }
|
||||
|
||||
#interactive-tutorial-exit:hover,
|
||||
#interactive-tutorial-exit:focus,
|
||||
#interactive-tutorial-next:hover,
|
||||
#interactive-tutorial-next:focus,
|
||||
#interactive-tutorial-back:hover,
|
||||
#interactive-tutorial-back:focus {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
cursor: pointer; }
|
||||
* {
|
||||
font-size: 16px;
|
||||
font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman"; }
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top; }
|
||||
|
||||
@-webkit-keyframes LOADERSPINNER {
|
||||
0% {
|
||||
@ -1461,100 +1503,61 @@ a:link, a:visited {
|
||||
opacity: 1.0;
|
||||
transform: translate(-50%, -50%) scale(1); } }
|
||||
|
||||
*, *:before, *:after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top; }
|
||||
|
||||
.loaderoverlay {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: white; }
|
||||
|
||||
.loaderoverlay .loaderspinner,
|
||||
.loaderoverlay .loaderspinner:before,
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
border: 20px solid rgba(0, 0, 0, 0);
|
||||
border-top: 20px solid #ccc;
|
||||
border-bottom: 20px solid #ccc;
|
||||
border-radius: 1000px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%; }
|
||||
|
||||
.loaderoverlay .loaderspinner:before,
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
content: ""; }
|
||||
|
||||
.loaderoverlay .loaderspinner {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
-webkit-animation: LOADERSPINNER 5s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 5s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 5s linear infinite;
|
||||
-o-animation: LOADERSPINNER 5s linear infinite;
|
||||
animation: LOADERSPINNER 5s linear infinite; }
|
||||
|
||||
.loaderoverlay .loaderspinner:before {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
-webkit-animation: LOADERSPINNER 10s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 10s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 10s linear infinite;
|
||||
-o-animation: LOADERSPINNER 10s linear infinite;
|
||||
animation: LOADERSPINNER 10s linear infinite; }
|
||||
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
-webkit-animation: LOADERSPINNER 5s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 5s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 5s linear infinite;
|
||||
-o-animation: LOADERSPINNER 5s linear infinite;
|
||||
animation: LOADERSPINNER 5s linear infinite; }
|
||||
|
||||
.loaderoverlay .loaderlabel {
|
||||
color: #6f3;
|
||||
text-transform: uppercase;
|
||||
font-family: sans-serif;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-animation: LOADERLABEL 5s linear infinite;
|
||||
-moz-animation: LOADERLABEL 5s linear infinite;
|
||||
-ms-animation: LOADERLABEL 5s linear infinite;
|
||||
-o-animation: LOADERLABEL 5s linear infinite;
|
||||
animation: LOADERLABEL 5s linear infinite; }
|
||||
|
||||
button[type="button"] {
|
||||
padding: 0.5rem 1rem;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
-o-transform: translateX(-50%);
|
||||
transform: translateX(-50%); }
|
||||
|
||||
/* Customize */
|
||||
.loaderoverlay {
|
||||
background: #000; }
|
||||
|
||||
.loaderoverlay .loaderspinner,
|
||||
.loaderoverlay .loaderspinner:before,
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
border-top-color: #6f3 !important;
|
||||
border-bottom-color: #6f3 !important; }
|
||||
|
||||
.loaderoverlay .loaderlabel {
|
||||
background: #000;
|
||||
color: #6f3; }
|
||||
.loaderoverlay .loaderspinner, .loaderoverlay .loaderspinner:before, .loaderoverlay .loaderspinner:after {
|
||||
border: 20px solid rgba(0, 0, 0, 0);
|
||||
border-top-color: #6f3;
|
||||
border-bottom-color: #6f3;
|
||||
border-radius: 1000px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%; }
|
||||
.loaderoverlay .loaderspinner:before,
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
content: ""; }
|
||||
.loaderoverlay .loaderspinner {
|
||||
-webkit-animation: LOADERSPINNER 5s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 5s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 5s linear infinite;
|
||||
-o-animation: LOADERSPINNER 5s linear infinite;
|
||||
animation: LOADERSPINNER 5s linear infinite;
|
||||
width: 200px;
|
||||
height: 200px; }
|
||||
.loaderoverlay .loaderspinner:before {
|
||||
-webkit-animation: LOADERSPINNER 10s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 10s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 10s linear infinite;
|
||||
-o-animation: LOADERSPINNER 10s linear infinite;
|
||||
animation: LOADERSPINNER 10s linear infinite;
|
||||
width: 160px;
|
||||
height: 160px; }
|
||||
.loaderoverlay .loaderspinner:after {
|
||||
-webkit-animation: LOADERSPINNER 5s linear infinite;
|
||||
-moz-animation: LOADERSPINNER 5s linear infinite;
|
||||
-ms-animation: LOADERSPINNER 5s linear infinite;
|
||||
-o-animation: LOADERSPINNER 5s linear infinite;
|
||||
animation: LOADERSPINNER 5s linear infinite;
|
||||
width: 120px;
|
||||
height: 120px; }
|
||||
.loaderoverlay .loaderlabel {
|
||||
-webkit-animation: LOADERLABEL 5s linear infinite;
|
||||
-moz-animation: LOADERLABEL 5s linear infinite;
|
||||
-ms-animation: LOADERLABEL 5s linear infinite;
|
||||
-o-animation: LOADERLABEL 5s linear infinite;
|
||||
animation: LOADERLABEL 5s linear infinite;
|
||||
text-transform: uppercase;
|
||||
font-family: sans-serif;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%; }
|
||||
|
||||
/* css for Missions */
|
||||
/* Hacking missions */
|
||||
@ -1571,9 +1574,8 @@ button[type="button"] {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding-right: 10px; }
|
||||
|
||||
.hack-mission-grid::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.hack-mission-grid::-webkit-scrollbar {
|
||||
display: none; }
|
||||
|
||||
.hack-mission-node {
|
||||
z-index: 5;
|
||||
@ -1581,16 +1583,15 @@ button[type="button"] {
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
display: inline-block; }
|
||||
|
||||
.hack-mission-node p {
|
||||
margin-top: 8px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
.hack-mission-node p {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
margin-top: 8px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
text-align: center; }
|
||||
|
||||
.hack-mission-player-node {
|
||||
color: #fff;
|
||||
@ -1605,55 +1606,61 @@ button[type="button"] {
|
||||
background-color: #f00; }
|
||||
|
||||
.hack-mission-cpu-node {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%; }
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
|
||||
.hack-mission-firewall-node {
|
||||
width: 90%;
|
||||
height: 100%; }
|
||||
|
||||
.hack-mission-database-node {
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
-webkit-transform: skew(20deg);
|
||||
-moz-transform: skew(20deg);
|
||||
-o-transform: skew(20deg); }
|
||||
|
||||
.hack-mission-database-node p {
|
||||
-webkit-transform: skew(-20deg);
|
||||
-moz-transform: skew(-20deg);
|
||||
-o-transform: skew(-20deg);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
text-align: center;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
-ms-transform: skew(20deg);
|
||||
-o-transform: skew(20deg);
|
||||
transform: skew(20deg);
|
||||
width: 100%;
|
||||
height: 90%; }
|
||||
.hack-mission-database-node p {
|
||||
-webkit-transform: skew(-20deg);
|
||||
-moz-transform: skew(-20deg);
|
||||
-ms-transform: skew(-20deg);
|
||||
-o-transform: skew(-20deg);
|
||||
transform: skew(-20deg);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
text-align: center; }
|
||||
|
||||
.hack-mission-transfer-node {
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
-webkit-transform: skew(-20deg);
|
||||
-moz-transform: skew(-20deg);
|
||||
-o-transform: skew(-20deg); }
|
||||
|
||||
.hack-mission-transfer-node p {
|
||||
-webkit-transform: skew(20deg);
|
||||
-moz-transform: skew(20deg);
|
||||
-o-transform: skew(20deg);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
text-align: center;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
-ms-transform: skew(-20deg);
|
||||
-o-transform: skew(-20deg);
|
||||
transform: skew(-20deg);
|
||||
width: 100%;
|
||||
height: 90%; }
|
||||
.hack-mission-transfer-node p {
|
||||
-webkit-transform: skew(20deg);
|
||||
-moz-transform: skew(20deg);
|
||||
-ms-transform: skew(20deg);
|
||||
-o-transform: skew(20deg);
|
||||
transform: skew(20deg);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
text-align: center; }
|
||||
|
||||
.hack-mission-spam-node,
|
||||
.hack-mission-shield-node {
|
||||
@ -1769,16 +1776,19 @@ button[type="button"] {
|
||||
margin: 2px;
|
||||
padding: 6px;
|
||||
border-radius: 25px;
|
||||
font-size: "12px";
|
||||
font-size: 12px;
|
||||
color: var(--my-font-color); }
|
||||
|
||||
.cmpy-mgmt-upgrade-div:hover {
|
||||
background-color: #333; }
|
||||
|
||||
#bladeburner-container p,
|
||||
#bladeburner-container pre,
|
||||
.cmpy-mgmt-advertising-info {
|
||||
font-size: 12px; }
|
||||
|
||||
#bladeburner-container a,
|
||||
#bladeburner-container div,
|
||||
#bladeburner-container p,
|
||||
#bladeburner-container pre,
|
||||
#bladeburner-container td {
|
||||
font-size: 13px; }
|
||||
|
||||
@ -1787,28 +1797,25 @@ button[type="button"] {
|
||||
margin: 7px;
|
||||
padding: 7px;
|
||||
white-space: pre-wrap; }
|
||||
|
||||
.bladeburner-action pre {
|
||||
white-space: pre-wrap; }
|
||||
.bladeburner-action pre {
|
||||
white-space: pre-wrap; }
|
||||
|
||||
/* Whatever action is currently active */
|
||||
.bladeburner-active-action {
|
||||
border: 4px solid #fff; }
|
||||
|
||||
/* Action & Skills panel navigation button */
|
||||
.bladeburner-nav-button {
|
||||
.bladeburner-nav-button, .bladeburner-nav-button-inactive {
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
padding: 2px;
|
||||
margin: 2px; }
|
||||
margin: 2px;
|
||||
padding: 2px; }
|
||||
|
||||
.bladeburner-nav-button:hover {
|
||||
background-color: #3d4044; }
|
||||
.bladeburner-nav-button {
|
||||
color: #fff; }
|
||||
.bladeburner-nav-button:hover {
|
||||
background-color: #3d4044; }
|
||||
|
||||
.bladeburner-nav-button-inactive {
|
||||
border: 1px solid #fff;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
text-decoration: none;
|
||||
background-color: #555;
|
||||
cursor: default;
|
||||
|
74
dist/vendor.bundle.js
vendored
74
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
77
index.html
77
index.html
@ -110,7 +110,7 @@
|
||||
|
||||
<div id="script-editor-filename-wrapper">
|
||||
<p id="script-editor-filename-tag"> <strong style="background-color:#555;">Script name: </strong></p>
|
||||
<input id="script-editor-filename" type="text" maxlength="30" tabindex="1" />
|
||||
<input id="script-editor-filename" type="text" maxlength="30" tabindex="1"/>
|
||||
</div>
|
||||
|
||||
<div id="javascript-editor"></div>
|
||||
@ -160,7 +160,7 @@
|
||||
|
||||
<fieldset>
|
||||
<label for="script-editor-option-maxerr" class="tooltip">Max Error Count</label>
|
||||
<input type="range" max="1000" min="50" value="200" step="1" name="script-editor-option-maxerr" id="script-editor-option-maxerr" />
|
||||
<input type="range" max="1000" min="50" value="200" step="1" name="script-editor-option-maxerr" id="script-editor-option-maxerr"/>
|
||||
<em id="script-editor-option-maxerror-value-label" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
</div> <!-- End script editor options panel -->
|
||||
@ -187,7 +187,10 @@
|
||||
<p id="active-scripts-text"> This page displays a list of all of your scripts that are currently running across every machine. It also
|
||||
provides information about each script's production. The scripts are categorized by the hostname of the servers on which
|
||||
they are running. </p>
|
||||
<p id="active-scripts-total-prod"> Total online production rate: </p>
|
||||
<p id="active-scripts-total-prod">Total online production of
|
||||
Active scripts: <span id="active-scripts-total-production-active">$0.000</span> / sec<br />
|
||||
Total online production since last Aug installation: <span id="active-scripts-total-prod-aug-total">$0.000</span>
|
||||
(<span id="active-scripts-total-prod-aug-avg">$0.000</span> / sec)</p>
|
||||
<ul class="active-scripts-list" id="active-scripts-list" style="list-style: none;">
|
||||
</ul>
|
||||
</div>
|
||||
@ -211,7 +214,7 @@
|
||||
<br>
|
||||
<div id="hacknet-nodes-money-multipliers-div">
|
||||
<p id="hacknet-nodes-money">
|
||||
<span>Money:</span><span id="hacknet-nodes-player-money" ></span><br />
|
||||
<span>Money:</span><span id="hacknet-nodes-player-money"></span><br/>
|
||||
<span>Total Hacknet Node Prodution:</span><span id="hacknet-nodes-total-production"></span>
|
||||
</p>
|
||||
<span id="hacknet-nodes-multipliers">
|
||||
@ -488,24 +491,24 @@
|
||||
|
||||
<!-- dev menu -->
|
||||
<div id="dev-menu-container" class="generic-menupage-container">
|
||||
<p id='dev-menu-text'>If you see this menu you can pretty much break the game. It's recommended that you use this menu only to setup a save file appropriate to test a new feature or bug fix.</p>
|
||||
<p id="dev-menu-text">If you see this menu you can pretty much break the game. It's recommended that you use this menu only to setup a save file appropriate to test a new feature or bug fix.</p>
|
||||
|
||||
<p id='dev-menu-text'>Generic</p>
|
||||
<p id="dev-menu-text">Generic</p>
|
||||
<a id="dev-need-money" class="a-link-button">Add $1000t</a>
|
||||
<a id="dev-need-ram" class="a-link-button">Double home RAM</a>
|
||||
|
||||
<p id='dev-menu-text'>Augmentation related: </p>
|
||||
<p id="dev-menu-text">Augmentation related: </p>
|
||||
<!-- gets populated with the list of all augments -->
|
||||
<select id="dev-menu-aug-dropdown" class="dropdown"></select>
|
||||
<a id="dev-add-aug" class="a-link-button tooltip">Queue Augmentation<span class="tooltiptext">May require save + reload</span></a>
|
||||
|
||||
<input id="dev-sf-n" type="number" class="text-input" placeholder="SourceFile-N"><input id="dev-sf-lvl" type="number" class="text-input" placeholder="SourceFile-Lvl"><a id="dev-add-source-file" class="a-link-button tooltip"> Add/Remove source file <span class="tooltiptext">If Lvl == 0 the sf will be removed, calling it with another level will replace your current source file. You CAN set a source file higher than it's maximum level.</span></a>
|
||||
|
||||
<p id='dev-menu-text'>Faction related: </p>
|
||||
<p id="dev-menu-text">Faction related: </p>
|
||||
<select id="dev-menu-faction-dropdown" class="dropdown"></select>
|
||||
<a id="dev-add-faction" class="a-link-button tooltip">Receive invite<span class="tooltiptext">May require save + reload</span></a>
|
||||
|
||||
<p id='dev-menu-text'>Program related: </p>
|
||||
<p id="dev-menu-text">Program related: </p>
|
||||
<select id="dev-menu-connect-dropdown" class="dropdown"></select>
|
||||
<a id="dev-connect" class="a-link-button tooltip">Connect<span class="tooltiptext">Connect to the target server.</span></a>
|
||||
|
||||
@ -514,12 +517,12 @@
|
||||
|
||||
<a id="dev-bit-flume" class="a-link-button tooltip">Trigger BitFlume<span class="tooltiptext">Quick escape to change BN, does not give SFs</span></a>
|
||||
|
||||
<p id='dev-menu-text'>Server related: </p>
|
||||
<p id="dev-menu-text">Server related: </p>
|
||||
<a id="dev-open-all" class="a-link-button tooltip">NUKE + ports all servers<span class="tooltiptext">Opens all ports, nukes all servers, gains root access to everything (still need the appropriate hacking level)</span></a>
|
||||
<a id="dev-min-security" class="a-link-button tooltip">minimize all servers security<span class="tooltiptext">All servers security will be set to their minimum security</span></a>
|
||||
<a id="dev-max-money" class="a-link-button tooltip">maximize all servers money<span class="tooltiptext">Set all servers available money to maximum for that server</span></a>
|
||||
|
||||
<p id='dev-menu-text'>Exp/stats related: </p>
|
||||
<p id="dev-menu-text">Exp/stats related: </p>
|
||||
<input id="dev-hacking-exp" type="number" class="text-input" placeholder="+exp/-exp (int)">
|
||||
<a id="dev-add-hacking" class="a-link-button tooltip">add hacking exp<span class="tooltiptext">Add that many hacking experience point, use negative numbers to remove, don't worry about going under 0 exp</span></a>
|
||||
<input id="dev-strength-exp" type="number" class="text-input" placeholder="+exp/-exp (int)">
|
||||
@ -641,7 +644,7 @@
|
||||
<a id="location-slums-heist" class="a-link-button tooltip"> Heist </a>
|
||||
|
||||
<!-- City Hall -->
|
||||
<a id="location-cityhall-create-corporation" class='a-link-button'>Create a Corporation</a>
|
||||
<a id="location-cityhall-create-corporation" class="a-link-button">Create a Corporation</a>
|
||||
|
||||
<!-- Bladeburner@NSA -->
|
||||
<a id="location-nsa-bladeburner" class="a-link-button">Bladeburner Division</a>
|
||||
@ -687,7 +690,7 @@
|
||||
you 'reset' by installing Augmentations.
|
||||
</p>
|
||||
<a id="stock-market-buy-tix-api" class="a-link-button-inactive">Buy Trade Information eXchange (TIX) API Access</a>
|
||||
<a id="stock-market-investopedia" class='a-link-button'>Investopedia</a>
|
||||
<a id="stock-market-investopedia" class="a-link-button">Investopedia</a>
|
||||
<p id="stock-market-commission"> </p>
|
||||
<a id="stock-market-mode" class="a-link-button tooltip"></a>
|
||||
<a id="stock-market-expand-tickers" class="a-link-button tooltip">Expand tickers</a>
|
||||
@ -719,7 +722,7 @@
|
||||
<div id="yes-no-text-input-box-container" class="popup-box-container">
|
||||
<div id="yes-no-text-input-box-content" class="popup-box-content">
|
||||
<p id="yes-no-text-input-box-text"> </p>
|
||||
<input type="text" id="yes-no-text-input-box-input" pattern="[a-zA-Z0-9-_]" maxlength="30" />
|
||||
<input type="text" id="yes-no-text-input-box-input" pattern="[a-zA-Z0-9-_]" maxlength="30"/>
|
||||
<span id="yes-no-text-input-box-yes" class="popup-box-button"> Yes </span>
|
||||
<span id="yes-no-text-input-box-no" class="popup-box-button"> No </span>
|
||||
</div>
|
||||
@ -781,9 +784,41 @@
|
||||
<!-- Character Overview Screen -->
|
||||
<div id="character-overview-wrapper">
|
||||
<div id="character-overview-container">
|
||||
<p id="character-overview-text"> </p>
|
||||
<span id="character-overview-save-button"> Save Game </span>
|
||||
<span id="character-overview-options-button"> Options </span>
|
||||
<div id="character-overview-text">
|
||||
<table>
|
||||
<tr id="character-hp-wrapper">
|
||||
<td>Hp:</td><td id="character-hp-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-money-wrapper">
|
||||
<td>Money: </td><td id="character-money-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-hack-wrapper">
|
||||
<td>Hack: </td><td id="character-hack-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-str-wrapper">
|
||||
<td>Str: </td><td id="character-str-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-def-wrapper">
|
||||
<td>Def: </td><td id="character-def-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-dex-wrapper">
|
||||
<td>Dex: </td><td id="character-dex-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-agi-wrapper">
|
||||
<td>Agi: </td><td id="character-agi-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-cha-wrapper">
|
||||
<td>Cha: </td><td id="character-cha-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<tr id="character-int-wrapper">
|
||||
<td>Int: </td><td id="character-int-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<table>
|
||||
</div>
|
||||
<div class="character-quick-options">
|
||||
<span id="character-overview-save-button"> Save Game </span>
|
||||
<span id="character-overview-options-button"> Options </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -809,7 +844,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type ="range" max="100" min="10" step="1" name="settingsNSExecTimeRangeVal" id="settingsNSExecTimeRangeVal" value="25" />
|
||||
<input type ="range" max="100" min="10" step="1" name="settingsNSExecTimeRangeVal" id="settingsNSExecTimeRangeVal" value="25"/>
|
||||
<em id="settingsNSExecTimeRangeValLabel" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
|
||||
@ -823,7 +858,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type="range" max="100" min="20" step="1" name="settingsNSLogRangeVal" id="settingsNSLogRangeVal" value="50" />
|
||||
<input type="range" max="100" min="20" step="1" name="settingsNSLogRangeVal" id="settingsNSLogRangeVal" value="50"/>
|
||||
<em id="settingsNSLogRangeValLabel" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
|
||||
@ -837,7 +872,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type="range" max="100" min="20" step="1" name="settingsNSPortRangeVal" id="settingsNSPortRangeVal" value="50" />
|
||||
<input type="range" max="100" min="20" step="1" name="settingsNSPortRangeVal" id="settingsNSPortRangeVal" value="50"/>
|
||||
<em id="settingsNSPortRangeValLabel" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
|
||||
@ -849,7 +884,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type="range" max="600" min="0" step="1" name="settingsAutosaveIntervalVal" id="settingsAutosaveIntervalVal" value="60" />
|
||||
<input type="range" max="600" min="0" step="1" name="settingsAutosaveIntervalVal" id="settingsAutosaveIntervalVal" value="60"/>
|
||||
<em id="settingsAutosaveIntervalValLabel" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import {Engine} from "./engine";
|
||||
import {workerScripts,
|
||||
addWorkerScript,
|
||||
killWorkerScript} from "./NetscriptWorker";
|
||||
import {Player} from "./Player";
|
||||
import {getServer} from "./Server";
|
||||
@ -8,12 +7,15 @@ import {dialogBoxCreate} from "../utils/DialogBox";
|
||||
import {createAccordionElement} from "../utils/uiHelpers/createAccordionElement";
|
||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
||||
import {createElement} from "../utils/uiHelpers/createElement";
|
||||
import {createProgressBarText} from "../utils/helpers/createProgressBarText";
|
||||
import {exceptionAlert} from "../utils/helpers/exceptionAlert";
|
||||
import {getElementById} from "../utils/uiHelpers/getElementById";
|
||||
import {logBoxCreate} from "../utils/LogBox";
|
||||
import numeral from "numeral/min/numeral.min";
|
||||
import {formatNumber} from "../utils/StringHelperFunctions";
|
||||
import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement";
|
||||
import {removeElement} from "../utils/uiHelpers/removeElement";
|
||||
import {roundToTwo} from "../utils/helpers/roundToTwo";
|
||||
|
||||
/* {
|
||||
* serverName: {
|
||||
@ -28,12 +30,39 @@ import {removeElement} from "../utils/uiHelpers/removeElement";
|
||||
let ActiveScriptsUI = {};
|
||||
let ActiveScriptsTasks = []; //Sequentially schedule the creation/deletion of UI elements
|
||||
|
||||
const getHeaderHtml = (server) => {
|
||||
// TODO: calculate the longest hostname length rather than hard coding it
|
||||
const longestHostnameLength = 18;
|
||||
const paddedName = `${server.hostname}${" ".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));
|
||||
const barOptions = {
|
||||
progress: server.ramUsed / server.maxRam,
|
||||
totalTicks: 30
|
||||
};
|
||||
return `${paddedName} ${createProgressBarText(barOptions)}`.replace(/\s/g, ' ');
|
||||
};
|
||||
|
||||
const updateHeaderHtml = (server) => {
|
||||
const accordion = ActiveScriptsUI[server.hostname];
|
||||
if (accordion === null || accordion === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// convert it to a string, as that's how it's stored it will come out of the data attributes
|
||||
const ramPercentage = '' + roundToTwo(server.ramUsed / server.maxRam);
|
||||
if (accordion.header.dataset.ramPercentage !== ramPercentage) {
|
||||
accordion.header.dataset.ramPercentage = ramPercentage;
|
||||
accordion.header.innerHTML = getHeaderHtml(server);
|
||||
}
|
||||
}
|
||||
|
||||
function createActiveScriptsServerPanel(server) {
|
||||
let hostname = server.hostname;
|
||||
|
||||
var activeScriptsList = document.getElementById("active-scripts-list");
|
||||
|
||||
let res = createAccordionElement({hdrText:hostname});
|
||||
let res = createAccordionElement({
|
||||
hdrText: getHeaderHtml(server)
|
||||
});
|
||||
let li = res[0];
|
||||
var hdr = res[1];
|
||||
let panel = res[2];
|
||||
@ -116,20 +145,27 @@ function addActiveScriptsItem(workerscript) {
|
||||
"Args: " + arrayToString(workerscript.args)
|
||||
}));
|
||||
var panelText = createElement("p", {
|
||||
innerText:"Loading...", fontSize:"14px",
|
||||
innerText: "Loading...",
|
||||
fontSize: "14px",
|
||||
});
|
||||
panel.appendChild(panelText);
|
||||
panel.appendChild(createElement("br"));
|
||||
panel.appendChild(createElement("span", {
|
||||
innerText:"Log", class:"active-scripts-button", margin:"4px", padding:"4px",
|
||||
clickListener:()=>{
|
||||
innerText: "Log",
|
||||
class: "active-scripts-button",
|
||||
margin: "4px",
|
||||
padding: "4px",
|
||||
clickListener: () => {
|
||||
logBoxCreate(workerscript.scriptRef);
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
panel.appendChild(createElement("span", {
|
||||
innerText:"Kill Script", class:"active-scripts-button", margin:"4px", padding:"4px",
|
||||
clickListener:()=>{
|
||||
innerText: "Kill Script",
|
||||
class: "active-scripts-button",
|
||||
margin: "4px",
|
||||
padding: "4px",
|
||||
clickListener: () => {
|
||||
killWorkerScript(workerscript.scriptRef, workerscript.scriptRef.scriptRef.server);
|
||||
dialogBoxCreate("Killing script, may take a few minutes to complete...");
|
||||
return false;
|
||||
@ -205,11 +241,10 @@ function updateActiveScriptsItems(maxTasks=150) {
|
||||
exceptionAlert(e);
|
||||
}
|
||||
}
|
||||
document.getElementById("active-scripts-total-prod").innerHTML =
|
||||
"Total online production of Active Scripts: " + numeral(total).format('$0.000a') + " / sec<br>" +
|
||||
"Total online production since last Aug installation: " +
|
||||
numeral(Player.scriptProdSinceLastAug).format('$0.000a') + " (" +
|
||||
numeral(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)";
|
||||
|
||||
getElementById("active-scripts-total-production-active").innerText = numeral(total).format('$0.000a');
|
||||
getElementById("active-scripts-total-prod-aug-total").innerText = numeral(Player.scriptProdSinceLastAug).format('$0.000a');
|
||||
getElementById("active-scripts-total-prod-aug-avg").innerText = numeral(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug/1000)).format('$0.000a');
|
||||
return total;
|
||||
}
|
||||
|
||||
@ -225,6 +260,8 @@ function updateActiveScriptsItemContent(workerscript) {
|
||||
return; //Hasn't been created yet. We'll skip it
|
||||
}
|
||||
|
||||
updateHeaderHtml(server);
|
||||
|
||||
var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
|
||||
for (var i = 0; i < workerscript.args.length; ++i) {
|
||||
itemNameArray.push(String(workerscript.args[i]));
|
||||
@ -252,6 +289,7 @@ function updateActiveScriptsText(workerscript, item, itemName) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateHeaderHtml(server);
|
||||
var onlineMps = workerscript.scriptRef.onlineMoneyMade / workerscript.scriptRef.onlineRunningTime;
|
||||
|
||||
//Only update if the item is visible
|
||||
|
@ -1421,13 +1421,6 @@ Bladeburner.prototype.completeOperation = function(success) {
|
||||
}
|
||||
|
||||
var city = this.getCurrentCity();
|
||||
if (this.logging.ops) {
|
||||
if (success) {
|
||||
this.log(action.name + " completed successfully! ")
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
switch (action.name) {
|
||||
case "Investigation":
|
||||
if (success) {
|
||||
|
58
src/CharacterOverview.js
Normal file
58
src/CharacterOverview.js
Normal file
@ -0,0 +1,58 @@
|
||||
import {Player} from "./Player";
|
||||
import numeral from "numeral/min/numeral.min";
|
||||
|
||||
function CharacterOverview() {
|
||||
this.hp = document.getElementById("character-hp-text");
|
||||
this.money = document.getElementById("character-money-text");
|
||||
this.hack = document.getElementById("character-hack-text");
|
||||
this.str = document.getElementById("character-str-text");
|
||||
this.def = document.getElementById("character-def-text");
|
||||
this.dex = document.getElementById("character-dex-text");
|
||||
this.agi = document.getElementById("character-agi-text");
|
||||
this.cha = document.getElementById("character-cha-text");
|
||||
this.int = document.getElementById("character-int-text");
|
||||
this.intWrapper = document.getElementById("character-int-wrapper");
|
||||
this.repaintElem = document.getElementById("character-overview-text");
|
||||
}
|
||||
|
||||
CharacterOverview.prototype.repaint = function() {
|
||||
// this is an arbitrary function we can call to trigger a repaint.
|
||||
this.repaintElem.getClientRects();
|
||||
}
|
||||
|
||||
CharacterOverview.prototype.update = function() {
|
||||
if (Player.hp == null) {Player.hp = Player.max_hp;}
|
||||
|
||||
const replaceAndChanged = function(elem, text) {
|
||||
if(elem.textContent === text) {
|
||||
return false;
|
||||
}
|
||||
elem.textContent = text;
|
||||
return true;
|
||||
}
|
||||
|
||||
let changed = false;
|
||||
changed = replaceAndChanged(this.hp, Player.hp + " / " + Player.max_hp) || changed;
|
||||
changed = replaceAndChanged(this.money, numeral(Player.money.toNumber()).format('($0.000a)')) || changed;
|
||||
changed = replaceAndChanged(this.hack, (Player.hacking_skill).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.str, (Player.strength).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.def, (Player.defense).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.dex, (Player.dexterity).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.agi, (Player.agility).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.cha, (Player.charisma).toLocaleString()) || changed;
|
||||
changed = replaceAndChanged(this.int, (Player.intelligence).toLocaleString()) || changed;
|
||||
|
||||
// handle int appearing
|
||||
const int = this.intWrapper;
|
||||
const old = int.style.display;
|
||||
const now = Player.intelligence >= 1 ? "" : "none";
|
||||
if(old !== now) {
|
||||
int.style.display = now;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// recalculate box size if something changed
|
||||
if(changed) this.repaint();
|
||||
}
|
||||
|
||||
export {CharacterOverview};
|
@ -491,33 +491,19 @@ let CONSTANTS = {
|
||||
"World Stock Exchange account and TIX API Access<br>",
|
||||
|
||||
LatestUpdate:
|
||||
"v0.40.0<br>" +
|
||||
"* <b>WARNING: This update makes some significant changes to Netscript and therefore you may need to " +
|
||||
"make some changes to your scripts. See <a href='https://www.reddit.com/r/Bitburner/comments/9252j4/psa_netscript_10_changes_in_next_version_v0400/' target='_blank'> " +
|
||||
"this post for details</a></b><br>" +
|
||||
"* Netscript 1.0 (NS1) now uses a fully-fledged ES5 JavaScript Interpreter. This means many new features are now available in NS1, and this also fixes several bugs." +
|
||||
" However this also means any ES6+ features are no longer supported in NS1 <br>" +
|
||||
"* When a server is hacked with a very large number of threads and left with no money, the server's security level " +
|
||||
"now only increases by however many threads were needed to drain the server. For example, if you hack a server with " +
|
||||
"5000 threads but it only needed 2000 threads to deplete the server's money, then the server's security will only increase " +
|
||||
"as if you had hacked it with 2000 threads (change by hydroflame)<br>" +
|
||||
"* Added getCurrentAction() to Bladeburner API<br>" +
|
||||
"* Added a variety of functions to Bladeburner API that deal with action levels (change by hydroflame)<br>" +
|
||||
"* Added getPurchasedServerLimit() and getPurchasedServerMaxRam() functions to Netscript (change by hydroflame & kopelli)<br>" +
|
||||
"* Added getOwnedSourceFiles() Singularity function (by hydroflame)<br>" +
|
||||
"* Completely re-designed the Hacknet Node API<br>" +
|
||||
"* getSkillLevel() in Bladeburner API now returns an error if no argument is passed in (as opposed to an object with all skill levels). This may break scripts<br>" +
|
||||
"* Minimum Netscript execution time reduced from 15ms to 10ms (configurable in Options)<br>" +
|
||||
"* Company reputation needed to get invited to Megacorporation factions decreased from 250k to 200k<br>" +
|
||||
"* HP is now reset (restored) when Augmenting<br>" +
|
||||
"* Source-File 6 now increases both the level and experience gain of all combat stats (it was only experience gain previously)<br>" +
|
||||
"* Reverted a previous change for Source-File 12. It's benefits are now multiplicative rather than additive<br>" +
|
||||
"* Starting Infiltration security level for almost every location decreased by ~10%<br>" +
|
||||
"* Changed 'fl1ght.exe' message when its listed conditions are fulfilled (by hydroflame)<br>" +
|
||||
"* The 'Save Game' button in the top-right overview panel now flashes red if autosave is disabled<br>" +
|
||||
"* Bug Fix: Infiltration buttons can no longer be clicked through NetscriptJS<br>" +
|
||||
"* Bug Fix: Bladeburner 'Overclock' skill can no longer be leveled above max level through the API (by hydroflame)<br>" +
|
||||
"* Bug Fix: Healthcare division in Bladeburner should no longer cause game to crash"
|
||||
"v0.40.1 - Community Update<br>" +
|
||||
"* Added getPurchasedServerCost() Netscript function (by kopelli)<br>" +
|
||||
"* Added getFavorToDonate() Netscript function (by hydroflame)<br>" +
|
||||
"* Added getFactionFavorGain() and getCompanyFavorGain() Singularity functions (by hydroflame)<br>" +
|
||||
"* Accumulated 'bonus' time in Bladeburner is now displayed in the UI (by hydroflame)<br>" +
|
||||
"* The Red Pill can now be purchased with negative money (since its supposed to be free) (by hydroflame)<br>" +
|
||||
"* Cranial Signal Processor Augmentations now have the previous generation as a prerequisite. i.e. Cranial Signal Processor - Gen II requires Gen I (by Kline-)<br>" +
|
||||
"* Bladeburner Raid operations can no longer be performed if your estimate of Synthoid communities is zero (by hydroflame)<br>" +
|
||||
"* The difficulty of BN-12 now scales faster (by hydroflame)<br>" +
|
||||
"* Active Scripts UI now shows a RAM Usage bar for each server (by kopelli)<br>" +
|
||||
"* Bug Fix: Corrected terminal timestamp format (by kopelli)<br>" +
|
||||
"* Bug Fix: NetscriptJS scripts should now die properly if they don't have a 'main' function (by hydroflame)<br>" +
|
||||
"* Various minor UI/QOL fixes by hydroflame, kopelli, and Kline-"
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import {registerEnv, unregisterEnv, makeEnvHeader} from "./NetscriptJSPreamble";
|
||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
|
||||
|
||||
// Makes a blob that contains the code of a given script.
|
||||
|
@ -1,42 +0,0 @@
|
||||
// A utility function that adds a preamble to each Netscript JS
|
||||
// script. This preamble will set all the global functions and
|
||||
// variables appropriately for the module.
|
||||
//
|
||||
// One caveat is that we don't allow the variables in the preable
|
||||
// to change. Unlike in normal Javascript, this would not change
|
||||
// properties of self. It would instead just change the variable
|
||||
// within the given module -- not good! Users should not really
|
||||
// need to do this anyway.
|
||||
|
||||
import uuidv4 from "uuid/v4";
|
||||
import {sprintf} from "sprintf-js";
|
||||
|
||||
window.__NSJS__environments = {};
|
||||
|
||||
// Returns the UUID for the env.
|
||||
export function registerEnv(env) {
|
||||
const uuid = uuidv4();
|
||||
window.__NSJS__environments[uuid] = env;
|
||||
return uuid;
|
||||
}
|
||||
|
||||
export function unregisterEnv(uuid) {
|
||||
delete window.__NSJS__environments[uuid];
|
||||
}
|
||||
|
||||
export function makeEnvHeader(uuid) {
|
||||
if (!(uuid in window.__NSJS__environments)) throw new Error("uuid is not in the environment" + uuid);
|
||||
|
||||
const env = window.__NSJS__environments[uuid];
|
||||
var envLines = [];
|
||||
for (const prop in env) {
|
||||
envLines.push("const ", prop, " = ", "__NSJS_ENV[\"", prop, "\"];\n");
|
||||
}
|
||||
|
||||
return sprintf(`
|
||||
'use strict';
|
||||
const __NSJS_ENV = window.__NSJS__environments['%s'];
|
||||
// The global variable assignments (hack, weaken, etc.).
|
||||
%s
|
||||
`, uuid, envLines.join(""));
|
||||
}
|
@ -20,6 +20,7 @@ import {Augmentations, installAugmentations,
|
||||
import {BitNodes, initBitNodes,
|
||||
initBitNodeMultipliers} from "./BitNode";
|
||||
import {Bladeburner} from "./Bladeburner";
|
||||
import {CharacterOverview} from "./CharacterOverview";
|
||||
import {cinematicTextFlag} from "./CinematicText";
|
||||
import {CompanyPositions, initCompanies} from "./Company";
|
||||
import {Corporation} from "./CompanyManagement";
|
||||
@ -280,6 +281,7 @@ let Engine = {
|
||||
Bladeburner: "Bladeburner",
|
||||
},
|
||||
currentPage: null,
|
||||
overview: new CharacterOverview(),
|
||||
|
||||
|
||||
//Time variables (milliseconds unix epoch time)
|
||||
@ -570,20 +572,7 @@ let Engine = {
|
||||
},
|
||||
|
||||
displayCharacterOverviewInfo: function() {
|
||||
if (Player.hp == null) {Player.hp = Player.max_hp;}
|
||||
var overviewText = "Hp: " + Player.hp + " / " + Player.max_hp + "<br>" +
|
||||
"Money: " + numeral(Player.money.toNumber()).format('($0.000a)') + "<br>" +
|
||||
"Hack: " + (Player.hacking_skill).toLocaleString() + "<br>" +
|
||||
"Str: " + (Player.strength).toLocaleString() + "<br>" +
|
||||
"Def: " + (Player.defense).toLocaleString() + "<br>" +
|
||||
"Dex: " + (Player.dexterity).toLocaleString() + "<br>" +
|
||||
"Agi: " + (Player.agility).toLocaleString() + "<br>" +
|
||||
"Cha: " + (Player.charisma).toLocaleString();
|
||||
if (Player.intelligence >= 1) {
|
||||
overviewText += "<br>Int: " + (Player.intelligence).toLocaleString();
|
||||
}
|
||||
document.getElementById("character-overview-text").innerHTML = overviewText.replace( / /g, " ");
|
||||
|
||||
Engine.overview.update();
|
||||
|
||||
|
||||
const save = document.getElementById("character-overview-save-button");
|
||||
|
Loading…
Reference in New Issue
Block a user