Merge upstream

This commit is contained in:
Matthew Goff 2018-08-04 13:22:27 -05:00 committed by GitHub
commit 4b87616aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 466 additions and 385 deletions

@ -433,8 +433,8 @@ a:visited {
position: absolute; /* Stay in place */ position: absolute; /* Stay in place */
right: 0; right: 0;
top: 0; top: 0;
height: 205px; /* Full height */ height: auto; /* Full height */
padding: 5px; padding: 8px;
border: 2px solid var(--my-highlight-color); border: 2px solid var(--my-highlight-color);
width: 19%; width: 19%;
overflow: auto; /* Enable scroll if needed */ overflow: auto; /* Enable scroll if needed */
@ -443,12 +443,18 @@ a:visited {
} }
#character-overview-text { #character-overview-text {
padding: 4px;
margin: 8px;
color: #fff; color: #fff;
background-color: #444; background-color: #444;
} }
.character-stat-text {
color: #fff;
background-color: #444;
}
.character-stat-cell {
text-align: right;
}
#character-overview-save-button, #character-overview-save-button,
#character-overview-options-button { #character-overview-options-button {
@include borderRadius(12px); @include borderRadius(12px);
@ -461,6 +467,10 @@ a:visited {
background-color: #000; background-color: #000;
} }
.character-quick-options {
padding-top: 5px;
}
#character-overview-save-button:hover, #character-overview-save-button:hover,
#character-overview-save-button:focus, #character-overview-save-button:focus,
#character-overview-options-button:hover, #character-overview-options-button:hover,
@ -540,3 +550,11 @@ a:visited {
.accordion-panel ul > li { .accordion-panel ul > li {
background-color: #555; 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;
}

File diff suppressed because one or more lines are too long

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 { :root {
--my-font-color: #6f3; --my-font-color: #6f3;
--my-background-color: #000; --my-background-color: #000;
--my-highlight-color: #fff; } --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 { body {
background-color: var(--my-background-color); } background-color: var(--my-background-color); }
@ -33,6 +39,18 @@ span {
margin: 4px; margin: 4px;
padding: 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 { #entire-game-container {
background-color: transparent; } background-color: transparent; }
@ -106,7 +124,8 @@ tr:focus {
border: 2px solid #fff; } border: 2px solid #fff; }
/* Make html links ("a" elements) nice looking buttons with this class */ /* Make html links ("a" elements) nice looking buttons with this class */
a:link, a:visited { a:link,
a:visited {
color: #fff; } color: #fff; }
.a-link-button { .a-link-button {
@ -407,9 +426,9 @@ a:link, a:visited {
/* Stay in place */ /* Stay in place */
right: 0; right: 0;
top: 0; top: 0;
height: 205px; height: auto;
/* Full height */ /* Full height */
padding: 5px; padding: 8px;
border: 2px solid var(--my-highlight-color); border: 2px solid var(--my-highlight-color);
width: 19%; width: 19%;
overflow: auto; overflow: auto;
@ -419,25 +438,33 @@ a:link, a:visited {
z-index: 1; } z-index: 1; }
#character-overview-text { #character-overview-text {
padding: 4px;
margin: 8px;
color: #fff; color: #fff;
background-color: #444; } background-color: #444; }
.character-stat-text {
color: #fff;
background-color: #444; }
.character-stat-cell {
text-align: right; }
#character-overview-save-button, #character-overview-save-button,
#character-overview-options-button { #character-overview-options-button {
color: #aaa;
font-size: 14px;
font-weight: bold;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
-moz-border-radius: 12px; -moz-border-radius: 12px;
border-radius: 12px; border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-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; box-shadow: 1px 1px 3px #000;
color: #aaa;
font-size: 14px;
font-weight: bold;
height: 22px; height: 22px;
background-color: #000; } background-color: #000; }
.character-quick-options {
padding-top: 5px; }
#character-overview-save-button:hover, #character-overview-save-button:hover,
#character-overview-save-button:focus, #character-overview-save-button:focus,
#character-overview-options-button:hover, #character-overview-options-button:hover,
@ -510,6 +537,13 @@ a:link, a:visited {
.accordion-panel ul > li { .accordion-panel ul > li {
background-color: #555; } 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 { #terminal-container {
position: fixed; position: fixed;
margin-left: 10%; margin-left: 10%;
@ -588,7 +622,7 @@ a:link, a:visited {
padding-bottom: 6px; padding-bottom: 6px;
border: 2px solid var(--my-highlight-color); border: 2px solid var(--my-highlight-color);
z-index: 1; 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,
.ace_line * { .ace_line * {
@ -636,6 +670,9 @@ a:link, a:visited {
color: #fff; } color: #fff; }
#script-editor-filename { #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; background-color: #555;
display: inline-block; display: inline-block;
float: center; float: center;
@ -643,10 +680,7 @@ a:link, a:visited {
color: #fff; color: #fff;
margin: 4px; margin: 4px;
padding: 2px; padding: 2px;
border: 2px solid var(--my-highlight-color); 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); }
#script-editor-status { #script-editor-status {
float: left; float: left;
@ -782,15 +816,15 @@ a:link, a:visited {
margin-left: 5%; } margin-left: 5%; }
.active-scripts-button { .active-scripts-button {
color: #aaa;
font-size: 16px;
font-weight: bold;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
-moz-border-radius: 12px; -moz-border-radius: 12px;
border-radius: 12px; border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-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; box-shadow: 1px 1px 3px #000;
color: #aaa;
font-size: 16px;
font-weight: bold;
margin: 4px; margin: 4px;
padding: 4px; padding: 4px;
background-color: #000; } background-color: #000; }
@ -835,13 +869,13 @@ a:link, a:visited {
display: inline-block; } display: inline-block; }
.hacknet-node { .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; margin: 6px;
padding: 6px; padding: 6px;
width: 34vw; width: 34vw;
border: 2px solid var(--my-highlight-color); 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); }
.hacknet-node-container { .hacknet-node-container {
display: inline-table; } display: inline-table; }
@ -858,8 +892,7 @@ a:link, a:visited {
margin: 0 4px; margin: 0 4px;
/* Don't want the vertical margin/padding, just left & right */ /* Don't want the vertical margin/padding, just left & right */
padding: 0 4px; padding: 0 4px;
width: 48px; width: 64px; }
/* Four times font-size */ }
.menu-page-text { .menu-page-text {
width: 70vw; } width: 70vw; }
@ -1097,19 +1130,19 @@ a:link, a:visited {
margin: 10px; } margin: 10px; }
#work-in-progress-cancel-button { #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; color: #aaa;
float: left; float: left;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
margin: 10px; margin: 10px;
padding: 5px; padding: 5px;
border-radius: 12px; border: 3px solid #fff; }
border: 3px solid #fff;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000; }
#work-in-progress-cancel-button:hover, #work-in-progress-cancel-button:hover,
#work-in-progress-cancel-button:focus { #work-in-progress-cancel-button:focus {
@ -1202,16 +1235,16 @@ a:link, a:visited {
padding: 10px; } padding: 10px; }
.dialog-box-close-button { .dialog-box-close-button {
float: right;
color: #aaa;
font-size: 20px;
font-weight: bold;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
-moz-border-radius: 12px; -moz-border-radius: 12px;
border-radius: 12px; border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-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 { #log-box-close {
position: fixed; position: fixed;
@ -1271,18 +1304,18 @@ a:link, a:visited {
width: 49%; } width: 49%; }
#game-options-close-button { #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; color: #aaa;
float: right; float: right;
margin: 4px; margin: 4px;
padding: 4px; padding: 4px;
font-size: 20px; font-size: 20px;
font-weight: bold; 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; }
#game-options-close-button:hover, #game-options-close-button:hover,
#game-options-close-button:focus { #game-options-close-button:focus {
@ -1317,9 +1350,8 @@ a:link, a:visited {
background-color: #444; background-color: #444;
/* Fallback color */ /* Fallback color */
color: #fff; } color: #fff; }
#interactive-tutorial-container > strong {
#interactive-tutorial-container > strong { background-color: #444; }
background-color: #444; }
#interactive-tutorial-text { #interactive-tutorial-text {
padding: 4px; padding: 4px;
@ -1330,16 +1362,24 @@ a:link, a:visited {
#interactive-tutorial-exit, #interactive-tutorial-exit,
#interactive-tutorial-next, #interactive-tutorial-next,
#interactive-tutorial-back { #interactive-tutorial-back {
color: #aaa;
font-size: 20px;
font-weight: bold;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
-moz-border-radius: 12px; -moz-border-radius: 12px;
border-radius: 12px; border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-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; box-shadow: 1px 1px 3px #000;
color: #aaa;
font-size: 20px;
font-weight: bold;
background-color: #000; } 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 { #interactive-tutorial-exit {
float: left; } float: left; }
@ -1351,15 +1391,17 @@ a:link, a:visited {
#interactive-tutorial-next { #interactive-tutorial-next {
float: right; } float: right; }
#interactive-tutorial-exit:hover, * {
#interactive-tutorial-exit:focus, font-size: 16px;
#interactive-tutorial-next:hover, font-family: "Lucida Console", "Lucida Sans Unicode", "Fira Mono", "Consolas", "Courier New", Courier, monospace, "Times New Roman"; }
#interactive-tutorial-next:focus,
#interactive-tutorial-back:hover, *,
#interactive-tutorial-back:focus { *:before,
color: #fff; *:after {
text-decoration: none; margin: 0;
cursor: pointer; } padding: 0;
box-sizing: border-box;
vertical-align: top; }
@-webkit-keyframes LOADERSPINNER { @-webkit-keyframes LOADERSPINNER {
0% { 0% {
@ -1461,100 +1503,61 @@ a:link, a:visited {
opacity: 1.0; opacity: 1.0;
transform: translate(-50%, -50%) scale(1); } } transform: translate(-50%, -50%) scale(1); } }
*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: border-box;
vertical-align: top; }
.loaderoverlay { .loaderoverlay {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: white; } background: #000;
.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 {
color: #6f3; } 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 */ /* css for Missions */
/* Hacking missions */ /* Hacking missions */
@ -1571,9 +1574,8 @@ button[type="button"] {
width: 100%; width: 100%;
overflow-y: auto; overflow-y: auto;
padding-right: 10px; } padding-right: 10px; }
.hack-mission-grid::-webkit-scrollbar {
.hack-mission-grid::-webkit-scrollbar { display: none; }
display: none; }
.hack-mission-node { .hack-mission-node {
z-index: 5; z-index: 5;
@ -1581,16 +1583,15 @@ button[type="button"] {
align-self: center; align-self: center;
justify-self: center; justify-self: center;
display: inline-block; } display: inline-block; }
.hack-mission-node p {
.hack-mission-node p { -webkit-user-select: none;
margin-top: 8px; -moz-user-select: none;
color: #fff; -ms-user-select: none;
font-size: 12px; user-select: none;
text-align: center; margin-top: 8px;
-webkit-user-select: none; color: #fff;
-moz-user-select: none; font-size: 12px;
-ms-user-select: none; text-align: center; }
user-select: none; }
.hack-mission-player-node { .hack-mission-player-node {
color: #fff; color: #fff;
@ -1605,55 +1606,61 @@ button[type="button"] {
background-color: #f00; } background-color: #f00; }
.hack-mission-cpu-node { .hack-mission-cpu-node {
width: 100%;
height: 100%;
-moz-border-radius: 50%;
-webkit-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 { .hack-mission-firewall-node {
width: 90%; width: 90%;
height: 100%; } height: 100%; }
.hack-mission-database-node { .hack-mission-database-node {
width: 100%;
height: 90%;
-webkit-transform: skew(20deg); -webkit-transform: skew(20deg);
-moz-transform: skew(20deg); -moz-transform: skew(20deg);
-o-transform: skew(20deg); } -ms-transform: skew(20deg);
-o-transform: skew(20deg);
.hack-mission-database-node p { transform: skew(20deg);
-webkit-transform: skew(-20deg); width: 100%;
-moz-transform: skew(-20deg); height: 90%; }
-o-transform: skew(-20deg); .hack-mission-database-node p {
color: #fff; -webkit-transform: skew(-20deg);
font-size: 12px; -moz-transform: skew(-20deg);
margin-top: 8px; -ms-transform: skew(-20deg);
text-align: center; -o-transform: skew(-20deg);
-webkit-user-select: none; transform: skew(-20deg);
-moz-user-select: none; -webkit-user-select: none;
-ms-user-select: none; -moz-user-select: none;
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 { .hack-mission-transfer-node {
width: 100%;
height: 90%;
-webkit-transform: skew(-20deg); -webkit-transform: skew(-20deg);
-moz-transform: skew(-20deg); -moz-transform: skew(-20deg);
-o-transform: skew(-20deg); } -ms-transform: skew(-20deg);
-o-transform: skew(-20deg);
.hack-mission-transfer-node p { transform: skew(-20deg);
-webkit-transform: skew(20deg); width: 100%;
-moz-transform: skew(20deg); height: 90%; }
-o-transform: skew(20deg); .hack-mission-transfer-node p {
color: #fff; -webkit-transform: skew(20deg);
font-size: 12px; -moz-transform: skew(20deg);
margin-top: 8px; -ms-transform: skew(20deg);
text-align: center; -o-transform: skew(20deg);
-webkit-user-select: none; transform: skew(20deg);
-moz-user-select: none; -webkit-user-select: none;
-ms-user-select: none; -moz-user-select: none;
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-spam-node,
.hack-mission-shield-node { .hack-mission-shield-node {
@ -1769,16 +1776,19 @@ button[type="button"] {
margin: 2px; margin: 2px;
padding: 6px; padding: 6px;
border-radius: 25px; border-radius: 25px;
font-size: "12px"; font-size: 12px;
color: var(--my-font-color); } color: var(--my-font-color); }
.cmpy-mgmt-upgrade-div:hover { .cmpy-mgmt-upgrade-div:hover {
background-color: #333; } background-color: #333; }
#bladeburner-container p, .cmpy-mgmt-advertising-info {
#bladeburner-container pre, font-size: 12px; }
#bladeburner-container a, #bladeburner-container a,
#bladeburner-container div, #bladeburner-container div,
#bladeburner-container p,
#bladeburner-container pre,
#bladeburner-container td { #bladeburner-container td {
font-size: 13px; } font-size: 13px; }
@ -1787,28 +1797,25 @@ button[type="button"] {
margin: 7px; margin: 7px;
padding: 7px; padding: 7px;
white-space: pre-wrap; } white-space: pre-wrap; }
.bladeburner-action pre {
.bladeburner-action pre { white-space: pre-wrap; }
white-space: pre-wrap; }
/* Whatever action is currently active */ /* Whatever action is currently active */
.bladeburner-active-action { .bladeburner-active-action {
border: 4px solid #fff; } border: 4px solid #fff; }
/* Action & Skills panel navigation button */ /* Action & Skills panel navigation button */
.bladeburner-nav-button { .bladeburner-nav-button, .bladeburner-nav-button-inactive {
border: 1px solid #fff; border: 1px solid #fff;
color: #fff; margin: 2px;
padding: 2px; padding: 2px; }
margin: 2px; }
.bladeburner-nav-button:hover { .bladeburner-nav-button {
background-color: #3d4044; } color: #fff; }
.bladeburner-nav-button:hover {
background-color: #3d4044; }
.bladeburner-nav-button-inactive { .bladeburner-nav-button-inactive {
border: 1px solid #fff;
padding: 2px;
margin: 2px;
text-decoration: none; text-decoration: none;
background-color: #555; background-color: #555;
cursor: default; cursor: default;

74
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -110,7 +110,7 @@
<div id="script-editor-filename-wrapper"> <div id="script-editor-filename-wrapper">
<p id="script-editor-filename-tag"> <strong style="background-color:#555;">Script name: </strong></p> <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>
<div id="javascript-editor"></div> <div id="javascript-editor"></div>
@ -160,7 +160,7 @@
<fieldset> <fieldset>
<label for="script-editor-option-maxerr" class="tooltip">Max Error Count</label> <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> <em id="script-editor-option-maxerror-value-label" style="font-style: normal;"></em>
</fieldset> </fieldset>
</div> <!-- End script editor options panel --> </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 <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 provides information about each script's production. The scripts are categorized by the hostname of the servers on which
they are running. </p> 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 class="active-scripts-list" id="active-scripts-list" style="list-style: none;">
</ul> </ul>
</div> </div>
@ -211,7 +214,7 @@
<br> <br>
<div id="hacknet-nodes-money-multipliers-div"> <div id="hacknet-nodes-money-multipliers-div">
<p id="hacknet-nodes-money"> <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> <span>Total Hacknet Node Prodution:</span><span id="hacknet-nodes-total-production"></span>
</p> </p>
<span id="hacknet-nodes-multipliers"> <span id="hacknet-nodes-multipliers">
@ -488,24 +491,24 @@
<!-- dev menu --> <!-- dev menu -->
<div id="dev-menu-container" class="generic-menupage-container"> <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-money" class="a-link-button">Add $1000t</a>
<a id="dev-need-ram" class="a-link-button">Double home RAM</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 --> <!-- gets populated with the list of all augments -->
<select id="dev-menu-aug-dropdown" class="dropdown"></select> <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> <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> <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> <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> <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> <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> <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> <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-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-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> <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)"> <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> <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)"> <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> <a id="location-slums-heist" class="a-link-button tooltip"> Heist </a>
<!-- City Hall --> <!-- 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 --> <!-- Bladeburner@NSA -->
<a id="location-nsa-bladeburner" class="a-link-button">Bladeburner Division</a> <a id="location-nsa-bladeburner" class="a-link-button">Bladeburner Division</a>
@ -687,7 +690,7 @@
you 'reset' by installing Augmentations. you 'reset' by installing Augmentations.
</p> </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-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> <p id="stock-market-commission"> </p>
<a id="stock-market-mode" class="a-link-button tooltip"></a> <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> <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-container" class="popup-box-container">
<div id="yes-no-text-input-box-content" class="popup-box-content"> <div id="yes-no-text-input-box-content" class="popup-box-content">
<p id="yes-no-text-input-box-text"> </p> <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-yes" class="popup-box-button"> Yes </span>
<span id="yes-no-text-input-box-no" class="popup-box-button"> No </span> <span id="yes-no-text-input-box-no" class="popup-box-button"> No </span>
</div> </div>
@ -781,9 +784,41 @@
<!-- Character Overview Screen --> <!-- Character Overview Screen -->
<div id="character-overview-wrapper"> <div id="character-overview-wrapper">
<div id="character-overview-container"> <div id="character-overview-container">
<p id="character-overview-text"> </p> <div id="character-overview-text">
<span id="character-overview-save-button"> Save Game </span> <table>
<span id="character-overview-options-button"> Options </span> <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:&nbsp;</td><td id="character-money-text" class="character-stat-cell"></td>
</tr>
<tr id="character-hack-wrapper">
<td>Hack:&nbsp;</td><td id="character-hack-text" class="character-stat-cell"></td>
</tr>
<tr id="character-str-wrapper">
<td>Str:&nbsp;</td><td id="character-str-text" class="character-stat-cell"></td>
</tr>
<tr id="character-def-wrapper">
<td>Def:&nbsp;</td><td id="character-def-text" class="character-stat-cell"></td>
</tr>
<tr id="character-dex-wrapper">
<td>Dex:&nbsp;</td><td id="character-dex-text" class="character-stat-cell"></td>
</tr>
<tr id="character-agi-wrapper">
<td>Agi:&nbsp;</td><td id="character-agi-text" class="character-stat-cell"></td>
</tr>
<tr id="character-cha-wrapper">
<td>Cha:&nbsp;</td><td id="character-cha-text" class="character-stat-cell"></td>
</tr>
<tr id="character-int-wrapper">
<td>Int:&nbsp;</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>
</div> </div>
@ -809,7 +844,7 @@
</span> </span>
</label> </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> <em id="settingsNSExecTimeRangeValLabel" style="font-style: normal;"></em>
</fieldset> </fieldset>
@ -823,7 +858,7 @@
</span> </span>
</label> </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> <em id="settingsNSLogRangeValLabel" style="font-style: normal;"></em>
</fieldset> </fieldset>
@ -837,7 +872,7 @@
</span> </span>
</label> </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> <em id="settingsNSPortRangeValLabel" style="font-style: normal;"></em>
</fieldset> </fieldset>
@ -849,7 +884,7 @@
</span> </span>
</label> </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> <em id="settingsAutosaveIntervalValLabel" style="font-style: normal;"></em>
</fieldset> </fieldset>

@ -1,6 +1,5 @@
import {Engine} from "./engine"; import {Engine} from "./engine";
import {workerScripts, import {workerScripts,
addWorkerScript,
killWorkerScript} from "./NetscriptWorker"; killWorkerScript} from "./NetscriptWorker";
import {Player} from "./Player"; import {Player} from "./Player";
import {getServer} from "./Server"; import {getServer} from "./Server";
@ -8,12 +7,15 @@ import {dialogBoxCreate} from "../utils/DialogBox";
import {createAccordionElement} from "../utils/uiHelpers/createAccordionElement"; import {createAccordionElement} from "../utils/uiHelpers/createAccordionElement";
import {arrayToString} from "../utils/helpers/arrayToString"; import {arrayToString} from "../utils/helpers/arrayToString";
import {createElement} from "../utils/uiHelpers/createElement"; import {createElement} from "../utils/uiHelpers/createElement";
import {createProgressBarText} from "../utils/helpers/createProgressBarText";
import {exceptionAlert} from "../utils/helpers/exceptionAlert"; import {exceptionAlert} from "../utils/helpers/exceptionAlert";
import {getElementById} from "../utils/uiHelpers/getElementById";
import {logBoxCreate} from "../utils/LogBox"; import {logBoxCreate} from "../utils/LogBox";
import numeral from "numeral/min/numeral.min"; import numeral from "numeral/min/numeral.min";
import {formatNumber} from "../utils/StringHelperFunctions"; import {formatNumber} from "../utils/StringHelperFunctions";
import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement"; import {removeChildrenFromElement} from "../utils/uiHelpers/removeChildrenFromElement";
import {removeElement} from "../utils/uiHelpers/removeElement"; import {removeElement} from "../utils/uiHelpers/removeElement";
import {roundToTwo} from "../utils/helpers/roundToTwo";
/* { /* {
* serverName: { * serverName: {
@ -28,12 +30,39 @@ import {removeElement} from "../utils/uiHelpers/removeElement";
let ActiveScriptsUI = {}; let ActiveScriptsUI = {};
let ActiveScriptsTasks = []; //Sequentially schedule the creation/deletion of UI elements 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, '&nbsp;');
};
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) { function createActiveScriptsServerPanel(server) {
let hostname = server.hostname; let hostname = server.hostname;
var activeScriptsList = document.getElementById("active-scripts-list"); var activeScriptsList = document.getElementById("active-scripts-list");
let res = createAccordionElement({hdrText:hostname}); let res = createAccordionElement({
hdrText: getHeaderHtml(server)
});
let li = res[0]; let li = res[0];
var hdr = res[1]; var hdr = res[1];
let panel = res[2]; let panel = res[2];
@ -116,20 +145,27 @@ function addActiveScriptsItem(workerscript) {
"Args: " + arrayToString(workerscript.args) "Args: " + arrayToString(workerscript.args)
})); }));
var panelText = createElement("p", { var panelText = createElement("p", {
innerText:"Loading...", fontSize:"14px", innerText: "Loading...",
fontSize: "14px",
}); });
panel.appendChild(panelText); panel.appendChild(panelText);
panel.appendChild(createElement("br")); panel.appendChild(createElement("br"));
panel.appendChild(createElement("span", { panel.appendChild(createElement("span", {
innerText:"Log", class:"active-scripts-button", margin:"4px", padding:"4px", innerText: "Log",
clickListener:()=>{ class: "active-scripts-button",
margin: "4px",
padding: "4px",
clickListener: () => {
logBoxCreate(workerscript.scriptRef); logBoxCreate(workerscript.scriptRef);
return false; return false;
} }
})); }));
panel.appendChild(createElement("span", { panel.appendChild(createElement("span", {
innerText:"Kill Script", class:"active-scripts-button", margin:"4px", padding:"4px", innerText: "Kill Script",
clickListener:()=>{ class: "active-scripts-button",
margin: "4px",
padding: "4px",
clickListener: () => {
killWorkerScript(workerscript.scriptRef, workerscript.scriptRef.scriptRef.server); killWorkerScript(workerscript.scriptRef, workerscript.scriptRef.scriptRef.server);
dialogBoxCreate("Killing script, may take a few minutes to complete..."); dialogBoxCreate("Killing script, may take a few minutes to complete...");
return false; return false;
@ -205,11 +241,10 @@ function updateActiveScriptsItems(maxTasks=150) {
exceptionAlert(e); exceptionAlert(e);
} }
} }
document.getElementById("active-scripts-total-prod").innerHTML =
"Total online production of Active Scripts: " + numeral(total).format('$0.000a') + " / sec<br>" + getElementById("active-scripts-total-production-active").innerText = numeral(total).format('$0.000a');
"Total online production since last Aug installation: " + getElementById("active-scripts-total-prod-aug-total").innerText = numeral(Player.scriptProdSinceLastAug).format('$0.000a');
numeral(Player.scriptProdSinceLastAug).format('$0.000a') + " (" + getElementById("active-scripts-total-prod-aug-avg").innerText = numeral(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug/1000)).format('$0.000a');
numeral(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)";
return total; return total;
} }
@ -225,6 +260,8 @@ function updateActiveScriptsItemContent(workerscript) {
return; //Hasn't been created yet. We'll skip it return; //Hasn't been created yet. We'll skip it
} }
updateHeaderHtml(server);
var itemNameArray = ["active", "scripts", server.hostname, workerscript.name]; var itemNameArray = ["active", "scripts", server.hostname, workerscript.name];
for (var i = 0; i < workerscript.args.length; ++i) { for (var i = 0; i < workerscript.args.length; ++i) {
itemNameArray.push(String(workerscript.args[i])); itemNameArray.push(String(workerscript.args[i]));
@ -252,6 +289,7 @@ function updateActiveScriptsText(workerscript, item, itemName) {
return; return;
} }
updateHeaderHtml(server);
var onlineMps = workerscript.scriptRef.onlineMoneyMade / workerscript.scriptRef.onlineRunningTime; var onlineMps = workerscript.scriptRef.onlineMoneyMade / workerscript.scriptRef.onlineRunningTime;
//Only update if the item is visible //Only update if the item is visible

@ -1421,13 +1421,6 @@ Bladeburner.prototype.completeOperation = function(success) {
} }
var city = this.getCurrentCity(); var city = this.getCurrentCity();
if (this.logging.ops) {
if (success) {
this.log(action.name + " completed successfully! ")
} else {
}
}
switch (action.name) { switch (action.name) {
case "Investigation": case "Investigation":
if (success) { if (success) {

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>", "World Stock Exchange account and TIX API Access<br>",
LatestUpdate: LatestUpdate:
"v0.40.0<br>" + "v0.40.1 - Community Update<br>" +
"* <b>WARNING: This update makes some significant changes to Netscript and therefore you may need to " + "* Added getPurchasedServerCost() Netscript function (by kopelli)<br>" +
"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'> " + "* Added getFavorToDonate() Netscript function (by hydroflame)<br>" +
"this post for details</a></b><br>" + "* Added getFactionFavorGain() and getCompanyFavorGain() Singularity functions (by hydroflame)<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." + "* Accumulated 'bonus' time in Bladeburner is now displayed in the UI (by hydroflame)<br>" +
" However this also means any ES6+ features are no longer supported in NS1 <br>" + "* The Red Pill can now be purchased with negative money (since its supposed to be free) (by hydroflame)<br>" +
"* When a server is hacked with a very large number of threads and left with no money, the server's security level " + "* 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>" +
"now only increases by however many threads were needed to drain the server. For example, if you hack a server with " + "* Bladeburner Raid operations can no longer be performed if your estimate of Synthoid communities is zero (by hydroflame)<br>" +
"5000 threads but it only needed 2000 threads to deplete the server's money, then the server's security will only increase " + "* The difficulty of BN-12 now scales faster (by hydroflame)<br>" +
"as if you had hacked it with 2000 threads (change by hydroflame)<br>" + "* Active Scripts UI now shows a RAM Usage bar for each server (by kopelli)<br>" +
"* Added getCurrentAction() to Bladeburner API<br>" + "* Bug Fix: Corrected terminal timestamp format (by kopelli)<br>" +
"* Added a variety of functions to Bladeburner API that deal with action levels (change by hydroflame)<br>" + "* Bug Fix: NetscriptJS scripts should now die properly if they don't have a 'main' function (by hydroflame)<br>" +
"* Added getPurchasedServerLimit() and getPurchasedServerMaxRam() functions to Netscript (change by hydroflame & kopelli)<br>" + "* Various minor UI/QOL fixes by hydroflame, kopelli, and Kline-"
"* 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"
} }

@ -1,4 +1,3 @@
import {registerEnv, unregisterEnv, makeEnvHeader} from "./NetscriptJSPreamble";
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator"; import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
// Makes a blob that contains the code of a given script. // 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, import {BitNodes, initBitNodes,
initBitNodeMultipliers} from "./BitNode"; initBitNodeMultipliers} from "./BitNode";
import {Bladeburner} from "./Bladeburner"; import {Bladeburner} from "./Bladeburner";
import {CharacterOverview} from "./CharacterOverview";
import {cinematicTextFlag} from "./CinematicText"; import {cinematicTextFlag} from "./CinematicText";
import {CompanyPositions, initCompanies} from "./Company"; import {CompanyPositions, initCompanies} from "./Company";
import {Corporation} from "./CompanyManagement"; import {Corporation} from "./CompanyManagement";
@ -280,6 +281,7 @@ let Engine = {
Bladeburner: "Bladeburner", Bladeburner: "Bladeburner",
}, },
currentPage: null, currentPage: null,
overview: new CharacterOverview(),
//Time variables (milliseconds unix epoch time) //Time variables (milliseconds unix epoch time)
@ -570,20 +572,7 @@ let Engine = {
}, },
displayCharacterOverviewInfo: function() { displayCharacterOverviewInfo: function() {
if (Player.hp == null) {Player.hp = Player.max_hp;} Engine.overview.update();
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, "&nbsp;");
const save = document.getElementById("character-overview-save-button"); const save = document.getElementById("character-overview-save-button");