mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-14 14:22:32 +01:00
v0.53.0
This commit is contained in:
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/engineStyle.bundle.js
vendored
2
dist/engineStyle.bundle.js
vendored
@ -1,2 +1,2 @@
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(u,i)&&u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={2:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;r.push([904,0]),o()}({904:function(n,t,o){"use strict";o.r(t);o(905),o(907),o(909),o(911),o(913),o(915),o(917),o(919),o(921),o(923),o(925),o(927),o(929),o(931),o(933),o(935),o(937),o(939),o(941),o(943),o(945),o(947),o(949),o(951),o(953),o(955),o(957),o(959),o(961),o(963),o(965),o(967)},907:function(n,t,o){},909:function(n,t,o){},911:function(n,t,o){},913:function(n,t,o){},915:function(n,t,o){},917:function(n,t,o){},919:function(n,t,o){},921:function(n,t,o){},923:function(n,t,o){},925:function(n,t,o){},927:function(n,t,o){},929:function(n,t,o){},931:function(n,t,o){},933:function(n,t,o){},935:function(n,t,o){},937:function(n,t,o){},939:function(n,t,o){},941:function(n,t,o){},943:function(n,t,o){},945:function(n,t,o){},947:function(n,t,o){},949:function(n,t,o){},951:function(n,t,o){},953:function(n,t,o){},955:function(n,t,o){},957:function(n,t,o){},959:function(n,t,o){},961:function(n,t,o){},963:function(n,t,o){},965:function(n,t,o){},967:function(n,t,o){}});
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(u,i)&&u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={2:0},r=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;r.push([905,0]),o()}({905:function(n,t,o){"use strict";o.r(t);o(906),o(908),o(910),o(912),o(914),o(916),o(918),o(920),o(922),o(924),o(926),o(928),o(930),o(932),o(934),o(936),o(938),o(940),o(942),o(944),o(946),o(948),o(950),o(952),o(954),o(956),o(958),o(960),o(962),o(964),o(966),o(968),o(970)},908:function(n,t,o){},910:function(n,t,o){},912:function(n,t,o){},914:function(n,t,o){},916:function(n,t,o){},918:function(n,t,o){},920:function(n,t,o){},922:function(n,t,o){},924:function(n,t,o){},926:function(n,t,o){},928:function(n,t,o){},930:function(n,t,o){},932:function(n,t,o){},934:function(n,t,o){},936:function(n,t,o){},938:function(n,t,o){},940:function(n,t,o){},942:function(n,t,o){},944:function(n,t,o){},946:function(n,t,o){},948:function(n,t,o){},950:function(n,t,o){},952:function(n,t,o){},954:function(n,t,o){},956:function(n,t,o){},958:function(n,t,o){},960:function(n,t,o){},962:function(n,t,o){},964:function(n,t,o){},966:function(n,t,o){},968:function(n,t,o){},970:function(n,t,o){}});
|
||||
//# sourceMappingURL=engineStyle.bundle.js.map
|
37
dist/engineStyle.css
vendored
37
dist/engineStyle.css
vendored
@ -3130,12 +3130,15 @@ input[type="checkbox"] {
|
||||
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
#bladeburner-container a,
|
||||
#bladeburner-container div,
|
||||
#bladeburner-container p,
|
||||
#bladeburner-container pre,
|
||||
#bladeburner-container td {
|
||||
font-size: 13px; }
|
||||
#bladeburner-container {
|
||||
position: fixed;
|
||||
padding: 6px; }
|
||||
#bladeburner-container a,
|
||||
#bladeburner-container div,
|
||||
#bladeburner-container p,
|
||||
#bladeburner-container pre,
|
||||
#bladeburner-container td {
|
||||
font-size: 13px; }
|
||||
|
||||
.bladeburner-action {
|
||||
border: 1px solid #fff;
|
||||
@ -3280,12 +3283,14 @@ input[type="checkbox"] {
|
||||
*/
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
.sleeve-container {
|
||||
#sleeves-container {
|
||||
position: fixed;
|
||||
padding: 6px; }
|
||||
|
||||
.sleeve-elem {
|
||||
border: 1px solid white;
|
||||
margin: 4px;
|
||||
width: 75%; }
|
||||
.sleeve-container p {
|
||||
font-size: 14px; }
|
||||
display: block; }
|
||||
|
||||
.sleeves-page-info {
|
||||
display: "block";
|
||||
@ -3303,11 +3308,15 @@ input[type="checkbox"] {
|
||||
*/
|
||||
/* COLORS */
|
||||
/* Attributes */
|
||||
.resleeve-container {
|
||||
#resleeve-container {
|
||||
position: fixed;
|
||||
padding: 6px; }
|
||||
|
||||
.resleeve-elem {
|
||||
border: 1px solid white;
|
||||
margin: 4px;
|
||||
width: 75%; }
|
||||
.resleeve-container p {
|
||||
.resleeve-elem p {
|
||||
font-size: 13px; }
|
||||
|
||||
.resleeve-panel {
|
||||
@ -6285,5 +6294,9 @@ html {
|
||||
50% {
|
||||
color: #adff2f; } }
|
||||
|
||||
#corporation-container {
|
||||
position: fixed;
|
||||
padding: 6px; }
|
||||
|
||||
|
||||
/*# sourceMappingURL=engineStyle.css.map*/
|
30
dist/vendor.bundle.js
vendored
30
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -3,6 +3,85 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.53.0 - 2021-09-09 Way too many things. (hydroflame & community)
|
||||
-------------------------------------------
|
||||
|
||||
** Dev? **
|
||||
|
||||
* The entire codebase has been run through a code prettifier, hurray for consistency. (@threehams)
|
||||
* Lots of test. (@threehams)
|
||||
* Massive improvements to build speed. (@threehams)
|
||||
* Dev notes: This won't affect any players but is immensely useful for me.
|
||||
|
||||
** Hacknet **
|
||||
|
||||
* Converted to ts/react
|
||||
|
||||
** Resleeving **
|
||||
|
||||
* Converted to ts/react
|
||||
|
||||
** Sleeves **
|
||||
|
||||
* Converted to ts/react. The ui should also have a better feel.
|
||||
* Fixed a bug that allowed players to recover shock much faster than intended.
|
||||
|
||||
** BN10 **
|
||||
|
||||
* You have access to Sleeves right away
|
||||
* In BN10 Sleeves start with 75 shock and 25 sync.
|
||||
|
||||
** MathJax **
|
||||
|
||||
* Several tooltips have been updated to display the relevant formula in Mathjax, e.g. Favor and reputation
|
||||
|
||||
** Corporation **
|
||||
|
||||
* Completely rewritten in React. Paving the way for bigger change.
|
||||
* Smart Supply is now smarter and won't deadlock the warehouse. It is also more configurable.
|
||||
* Several UI fixes.
|
||||
|
||||
** Bladeburner **
|
||||
|
||||
* Action count is no longer decided when joining the Bladeburners. Experiences for all players should be more similar.
|
||||
|
||||
** Factions **
|
||||
|
||||
* No factions have home computer ram requirement. This caused some confusion for new players.
|
||||
|
||||
** Gang **
|
||||
|
||||
* Made it clear when there's a new equipment coming up.
|
||||
|
||||
** Netscript **
|
||||
|
||||
* getActionCountRemaining now returns Infinity for bladeburner general actions. (@brubsy)
|
||||
* getActionEstimatedSuccessChance now returns 100% for Diplomacy and Hyperbolic Regeneration Chamber. (@brubsy)
|
||||
* disableLog('ALL') now disables all logs individually, meaning you can re-enable the ones you want after. (@Cass)
|
||||
* getPlayer returns numPeopleKilled.
|
||||
* Dynamic RAM calculation errors have a better error message.
|
||||
* Hide some functions from autocomplete.
|
||||
* Added getAugmentationPrice, getAugmentationRepReq, deprecated getAugmentationCost. (@TempFound)
|
||||
* Fixed bug where some crime API would return "assassinate" when that's not accepted in other functions.
|
||||
|
||||
** Coding Contract **
|
||||
|
||||
* Spiralize Matrix is easier to read.
|
||||
|
||||
** Misc. **
|
||||
|
||||
* The world map is now used in sleeve travel and bladeburner travel.
|
||||
* noselect a bunch of stuff.
|
||||
* Ascii maps letters are more contrasting
|
||||
* Updated documentation for infiltration.
|
||||
* Most money costs in the game will turn grey/cyan when you don't have enough money.
|
||||
* Donation textbox has better look & feel.
|
||||
* Tech vendors ram & cores buttons have better look and feels.
|
||||
* cores cost modified to be a formula instead of a semi-random array of numbers.
|
||||
* Tech vendors now give a hint about where to get bigger servers.
|
||||
* logboxes now displays whitespaces exactly. (@Cass)
|
||||
* nerf noodle bar
|
||||
|
||||
v0.52.9 - 2021-08-27 Less lag! (hydroflame & community)
|
||||
-------------------------------------------
|
||||
|
||||
|
@ -64,9 +64,9 @@ documentation_title = '{0} Documentation'.format(project)
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.52'
|
||||
version = '0.53'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.52.9'
|
||||
release = '0.53.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
18
index.html
18
index.html
@ -258,9 +258,6 @@
|
||||
<!-- Milestones content -->
|
||||
<div id="milestones-container" class="generic-menupage-container"></div>
|
||||
|
||||
<!-- Bladeburner -->
|
||||
<div id="bladeburner-container" class="generic-menupage-container"></div>
|
||||
|
||||
<!-- Tutorial content -->
|
||||
<div id="tutorial-container" class="generic-menupage-container">
|
||||
<h1>Tutorial (AKA Links to Documentation)</h1>
|
||||
@ -290,16 +287,13 @@
|
||||
|
||||
<!-- Location (visiting a location in World) -->
|
||||
<div id="location-container" class="generic-menupage-container"></div>
|
||||
|
||||
<div id="infiltration-container" class="generic-fullscreen-container"></div>
|
||||
|
||||
<div id="stock-market-container" class="generic-menupage-container">
|
||||
<!-- React Component -->
|
||||
</div>
|
||||
|
||||
<div id="gang-container" class="generic-menupage-container">
|
||||
<!-- React Component -->
|
||||
</div>
|
||||
<div id="stock-market-container" class="generic-menupage-container"></div>
|
||||
<div id="bladeburner-container" class="generic-menupage-container"></div>
|
||||
<div id="resleeve-container" class="generic-menupage-container"></div>
|
||||
<div id="gang-container" class="generic-menupage-container"></div>
|
||||
<div id="corporation-container" class="generic-menupage-container"></div>
|
||||
<div id="sleeves-container" class="generic-menupage-container"></div>
|
||||
|
||||
<!-- Generic Yes/No Pop Up box -->
|
||||
<div id="yes-no-box-container" class="popup-box-container">
|
||||
|
@ -143,5 +143,5 @@
|
||||
"watch": "webpack --watch --mode production",
|
||||
"watch:dev": "webpack --watch --mode development"
|
||||
},
|
||||
"version": "0.52.9"
|
||||
"version": "0.53.0"
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from "react";
|
||||
import { removePopup } from "../../ui/React/createPopup";
|
||||
import { BladeburnerConstants } from "../data/Constants";
|
||||
import { IBladeburner } from "../IBladeburner";
|
||||
import { WorldMap } from "../../ui/React/WorldMap";
|
||||
import { CityName } from "../../Locations/data/CityNames";
|
||||
|
@ -121,7 +121,7 @@ export const CONSTANTS: {
|
||||
TotalNumBitNodes: number;
|
||||
LatestUpdate: string;
|
||||
} = {
|
||||
Version: "0.52.9",
|
||||
Version: "0.53.0",
|
||||
|
||||
// Speed (in ms) at which the main loop is updated
|
||||
_idleSpeed: 200,
|
||||
@ -344,35 +344,83 @@ export const CONSTANTS: {
|
||||
TotalNumBitNodes: 24,
|
||||
|
||||
LatestUpdate: `
|
||||
v0.52.9 - 2021-08-27 Less lag! (hydroflame & community)
|
||||
v0.53.0 - 2021-09-09 Way too many things. (hydroflame & community)
|
||||
-------------------------------------------
|
||||
|
||||
** Active Scripts page **
|
||||
** Dev? **
|
||||
|
||||
* Now less laggy, has pagination.
|
||||
* The entire codebase has been run through a code prettifier, hurray for consistency. (@threehams)
|
||||
* Lots of test. (@threehams)
|
||||
* Massive improvements to build speed. (@threehams)
|
||||
* Dev notes: This won't affect any players but is immensely useful for me.
|
||||
|
||||
** File diagnostic **
|
||||
** Hacknet **
|
||||
|
||||
* Added a popup found under options that shows the files you own and how
|
||||
large they are. This help find bugs and leftover massive logs files.
|
||||
* Converted to ts/react
|
||||
|
||||
** Corporation **
|
||||
** Resleeving **
|
||||
|
||||
* Added safeguard against a very specific bug that causes NaN money. I'm
|
||||
still not sure what the root cause is but it should prevent corp from
|
||||
breaking.
|
||||
* Converted to ts/react
|
||||
|
||||
** Netscript **
|
||||
** Sleeves **
|
||||
|
||||
* tprintf is a new function that doesn't print the filename.
|
||||
* Converted to ts/react. The ui should also have a better feel.
|
||||
* Fixed a bug that allowed players to recover shock much faster than intended.
|
||||
|
||||
** BN10 **
|
||||
|
||||
* You have access to Sleeves right away
|
||||
* In BN10 Sleeves start with 75 shock and 25 sync.
|
||||
|
||||
** MathJax **
|
||||
|
||||
* Several tooltips have been updated to display the relevant formula in Mathjax, e.g. Favor and reputation
|
||||
|
||||
** Corporation **
|
||||
|
||||
* Completely rewritten in React. Paving the way for bigger change.
|
||||
* Smart Supply is now smarter and won't deadlock the warehouse. It is also more configurable.
|
||||
* Several UI fixes.
|
||||
|
||||
** Bladeburner **
|
||||
|
||||
* Action count is no longer decided when joining the Bladeburners. Experiences for all players should be more similar.
|
||||
|
||||
** Factions **
|
||||
|
||||
* No factions have home computer ram requirement. This caused some confusion for new players.
|
||||
|
||||
** Gang **
|
||||
|
||||
* Made it clear when there's a new equipment coming up.
|
||||
|
||||
** Netscript **
|
||||
|
||||
* getActionCountRemaining now returns Infinity for bladeburner general actions. (@brubsy)
|
||||
* getActionEstimatedSuccessChance now returns 100% for Diplomacy and Hyperbolic Regeneration Chamber. (@brubsy)
|
||||
* disableLog('ALL') now disables all logs individually, meaning you can re-enable the ones you want after. (@Cass)
|
||||
* getPlayer returns numPeopleKilled.
|
||||
* Dynamic RAM calculation errors have a better error message.
|
||||
* Hide some functions from autocomplete.
|
||||
* Added getAugmentationPrice, getAugmentationRepReq, deprecated getAugmentationCost. (@TempFound)
|
||||
* Fixed bug where some crime API would return "assassinate" when that's not accepted in other functions.
|
||||
|
||||
** Coding Contract **
|
||||
|
||||
* Spiralize Matrix is easier to read.
|
||||
|
||||
** Misc. **
|
||||
|
||||
* Infiltration kills you if you try to automate it. (@threehams)
|
||||
* Fix beautify button not working
|
||||
* Added bladeburner_analysis_mult to getPlayer() (@brusby)
|
||||
* Fixed joining bladeburner via netscript functions. (@omuretsu)
|
||||
* All bladeburner actions are click-to-copy
|
||||
* The world map is now used in sleeve travel and bladeburner travel.
|
||||
* noselect a bunch of stuff.
|
||||
* Ascii maps letters are more contrasting
|
||||
* Updated documentation for infiltration.
|
||||
* Most money costs in the game will turn grey/cyan when you don't have enough money.
|
||||
* Donation textbox has better look & feel.
|
||||
* Tech vendors ram & cores buttons have better look and feels.
|
||||
* cores cost modified to be a formula instead of a semi-random array of numbers.
|
||||
* Tech vendors now give a hint about where to get bigger servers.
|
||||
* logboxes now displays whitespaces exactly. (@Cass)
|
||||
* nerf noodle bar
|
||||
`,
|
||||
|
||||
|
@ -1,36 +1,20 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { Sleeve } from "../Sleeve";
|
||||
import { SleeveTaskType } from "../SleeveTaskTypesEnum";
|
||||
import { SleeveFaq } from "../data/SleeveFaq";
|
||||
|
||||
import { IPlayer } from "../../IPlayer";
|
||||
import { CONSTANTS } from "../../../Constants";
|
||||
|
||||
import { Faction } from "../../../Faction/Faction";
|
||||
import { Factions } from "../../../Faction/Factions";
|
||||
import { FactionWorkType } from "../../../Faction/FactionWorkTypeEnum";
|
||||
|
||||
import { Crime } from "../../../Crime/Crime";
|
||||
import { Crimes } from "../../../Crime/Crimes";
|
||||
import { CityName } from "../../../Locations/data/CityNames";
|
||||
import { LocationName } from "../../../Locations/data/LocationNames";
|
||||
|
||||
import { numeralWrapper } from "../../../ui/numeralFormat";
|
||||
import { Page, routing } from "../../../ui/navigationTracking";
|
||||
|
||||
import { dialogBoxCreate } from "../../../../utils/DialogBox";
|
||||
|
||||
import { createProgressBarText } from "../../../../utils/helpers/createProgressBarText";
|
||||
import { exceptionAlert } from "../../../../utils/helpers/exceptionAlert";
|
||||
|
||||
import { clearEventListeners } from "../../../../utils/uiHelpers/clearEventListeners";
|
||||
import { createElement } from "../../../../utils/uiHelpers/createElement";
|
||||
import { createOptionElement } from "../../../../utils/uiHelpers/createOptionElement";
|
||||
import { createPopup } from "../../../ui/React/createPopup";
|
||||
import { getSelectValue } from "../../../../utils/uiHelpers/getSelectData";
|
||||
import { removeChildrenFromElement } from "../../../../utils/uiHelpers/removeChildrenFromElement";
|
||||
import { removeElement } from "../../../../utils/uiHelpers/removeElement";
|
||||
|
||||
import { SleeveAugmentationsPopup } from "../ui/SleeveAugmentationsPopup";
|
||||
import { TravelPopup } from "../ui/TravelPopup";
|
||||
@ -80,30 +64,29 @@ export function SleeveElem(props: IProps): React.ReactElement {
|
||||
|
||||
function setTask(): void {
|
||||
props.sleeve.resetTaskStatus(); // sets to idle
|
||||
let res;
|
||||
switch (abc[0]) {
|
||||
case "------":
|
||||
break;
|
||||
case "Work for Company":
|
||||
res = props.sleeve.workForCompany(props.player, abc[1]);
|
||||
props.sleeve.workForCompany(props.player, abc[1]);
|
||||
break;
|
||||
case "Work for Faction":
|
||||
res = props.sleeve.workForFaction(props.player, abc[1], abc[2]);
|
||||
props.sleeve.workForFaction(props.player, abc[1], abc[2]);
|
||||
break;
|
||||
case "Commit Crime":
|
||||
res = props.sleeve.commitCrime(props.player, abc[1]);
|
||||
props.sleeve.commitCrime(props.player, abc[1]);
|
||||
break;
|
||||
case "Take University Course":
|
||||
res = props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);
|
||||
props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);
|
||||
break;
|
||||
case "Workout at Gym":
|
||||
res = props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);
|
||||
props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);
|
||||
break;
|
||||
case "Shock Recovery":
|
||||
res = props.sleeve.shockRecovery(props.player);
|
||||
props.sleeve.shockRecovery(props.player);
|
||||
break;
|
||||
case "Synchronize":
|
||||
res = props.sleeve.synchronize(props.player);
|
||||
props.sleeve.synchronize(props.player);
|
||||
break;
|
||||
default:
|
||||
console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);
|
||||
|
@ -1,45 +1,7 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { Sleeve } from "../Sleeve";
|
||||
import { SleeveTaskType } from "../SleeveTaskTypesEnum";
|
||||
import { SleeveFaq } from "../data/SleeveFaq";
|
||||
|
||||
import { IPlayer } from "../../IPlayer";
|
||||
|
||||
import { Faction } from "../../../Faction/Faction";
|
||||
import { Factions } from "../../../Faction/Factions";
|
||||
import { FactionWorkType } from "../../../Faction/FactionWorkTypeEnum";
|
||||
|
||||
import { Crime } from "../../../Crime/Crime";
|
||||
import { Crimes } from "../../../Crime/Crimes";
|
||||
import { CityName } from "../../../Locations/data/CityNames";
|
||||
import { LocationName } from "../../../Locations/data/LocationNames";
|
||||
|
||||
import { numeralWrapper } from "../../../ui/numeralFormat";
|
||||
import { Page, routing } from "../../../ui/navigationTracking";
|
||||
|
||||
import { dialogBoxCreate } from "../../../../utils/DialogBox";
|
||||
|
||||
import { createProgressBarText } from "../../../../utils/helpers/createProgressBarText";
|
||||
import { exceptionAlert } from "../../../../utils/helpers/exceptionAlert";
|
||||
|
||||
import { clearEventListeners } from "../../../../utils/uiHelpers/clearEventListeners";
|
||||
import { createElement } from "../../../../utils/uiHelpers/createElement";
|
||||
import { createOptionElement } from "../../../../utils/uiHelpers/createOptionElement";
|
||||
import { createPopup } from "../../../ui/React/createPopup";
|
||||
import { getSelectValue } from "../../../../utils/uiHelpers/getSelectData";
|
||||
import { removeChildrenFromElement } from "../../../../utils/uiHelpers/removeChildrenFromElement";
|
||||
import { removeElement } from "../../../../utils/uiHelpers/removeElement";
|
||||
|
||||
import { SleeveAugmentationsPopup } from "../ui/SleeveAugmentationsPopup";
|
||||
import { TravelPopup } from "../ui/TravelPopup";
|
||||
import { EarningsTableElement } from "../ui/EarningsTableElement";
|
||||
import { Money } from "../../../ui/React/Money";
|
||||
import { MoneyRate } from "../../../ui/React/MoneyRate";
|
||||
import { ReputationRate } from "../../../ui/React/ReputationRate";
|
||||
import { StatsElement } from "../ui/StatsElement";
|
||||
import { MoreStatsContent } from "../ui/MoreStatsContent";
|
||||
import { MoreEarningsContent } from "../ui/MoreEarningsContent";
|
||||
import { SleeveElem } from "../ui/SleeveElem";
|
||||
|
||||
interface IProps {
|
||||
|
@ -41,7 +41,7 @@ function possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {
|
||||
forbiddenCompanies.push(otherSleeve.currentTaskLocation);
|
||||
}
|
||||
}
|
||||
let allJobs: string[] = Object.keys(player.jobs);
|
||||
const allJobs: string[] = Object.keys(player.jobs);
|
||||
for (let i = 0; i < allJobs.length; ++i) {
|
||||
if (!forbiddenCompanies.includes(allJobs[i])) {
|
||||
allJobs[i];
|
||||
@ -84,7 +84,7 @@ const tasks: {
|
||||
["Shock Recovery"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;
|
||||
["Synchronize"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;
|
||||
} = {
|
||||
"------": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
"------": (): ITaskDetails => {
|
||||
return { first: ["------"], second: () => ["------"] };
|
||||
},
|
||||
"Work for Company": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
@ -116,7 +116,7 @@ const tasks: {
|
||||
},
|
||||
};
|
||||
},
|
||||
"Commit Crime": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
"Commit Crime": (): ITaskDetails => {
|
||||
return { first: Object.keys(Crimes), second: () => ["------"] };
|
||||
},
|
||||
"Take University Course": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
@ -157,10 +157,10 @@ const tasks: {
|
||||
|
||||
return { first: gymSelectorOptions, second: () => gyms };
|
||||
},
|
||||
"Shock Recovery": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
"Shock Recovery": (): ITaskDetails => {
|
||||
return { first: ["------"], second: () => ["------"] };
|
||||
},
|
||||
Synchronize: (player: IPlayer, sleeve: Sleeve): ITaskDetails => {
|
||||
Synchronize: (): ITaskDetails => {
|
||||
return { first: ["------"], second: () => ["------"] };
|
||||
},
|
||||
};
|
||||
@ -176,16 +176,14 @@ const canDo: {
|
||||
["Shock Recovery"]: (player: IPlayer, sleeve: Sleeve) => boolean;
|
||||
["Synchronize"]: (player: IPlayer, sleeve: Sleeve) => boolean;
|
||||
} = {
|
||||
["------"]: () => true,
|
||||
["Work for Company"]: (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,
|
||||
["Work for Faction"]: (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,
|
||||
["Commit Crime"]: () => true,
|
||||
["Take University Course"]: (player: IPlayer, sleeve: Sleeve) =>
|
||||
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||
["Workout at Gym"]: (player: IPlayer, sleeve: Sleeve) =>
|
||||
[CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||
["Shock Recovery"]: (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,
|
||||
["Synchronize"]: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,
|
||||
"------": () => true,
|
||||
"Work for Company": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,
|
||||
"Work for Faction": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,
|
||||
"Commit Crime": () => true,
|
||||
"Take University Course": (player: IPlayer, sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||
"Workout at Gym": (player: IPlayer, sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),
|
||||
"Shock Recovery": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,
|
||||
Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,
|
||||
};
|
||||
|
||||
function getABC(sleeve: Sleeve): [string, string, string] {
|
||||
@ -194,7 +192,7 @@ function getABC(sleeve: Sleeve): [string, string, string] {
|
||||
return ["------", "------", "------"];
|
||||
case SleeveTaskType.Company:
|
||||
return ["Work for Company", sleeve.currentTaskLocation, "------"];
|
||||
case SleeveTaskType.Faction:
|
||||
case SleeveTaskType.Faction: {
|
||||
let workType = "";
|
||||
switch (sleeve.factionWorkType) {
|
||||
case FactionWorkType.Hacking:
|
||||
@ -208,6 +206,7 @@ function getABC(sleeve: Sleeve): [string, string, string] {
|
||||
break;
|
||||
}
|
||||
return ["Work for Faction", sleeve.currentTaskLocation, workType];
|
||||
}
|
||||
case SleeveTaskType.Crime:
|
||||
return ["Commit Crime", sleeve.crimeType, "------"];
|
||||
case SleeveTaskType.Class:
|
||||
@ -227,8 +226,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
|
||||
const [s1, setS1] = useState(abc[1]);
|
||||
const [s2, setS2] = useState(abc[2]);
|
||||
|
||||
const validActions = Object.keys(canDo).filter((k) =>
|
||||
(canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),
|
||||
const validActions = Object.keys(canDo).filter((k) => (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),
|
||||
);
|
||||
|
||||
const detailsF = tasks[s0];
|
||||
|
@ -2,7 +2,6 @@ import React from "react";
|
||||
import { Sleeve } from "../Sleeve";
|
||||
import { IPlayer } from "../../IPlayer";
|
||||
import { CONSTANTS } from "../../../Constants";
|
||||
import { Cities } from "../../../Locations/Cities";
|
||||
import { removePopup } from "../../../ui/React/createPopup";
|
||||
import { Money } from "../../../ui/React/Money";
|
||||
import { WorldMap } from "../../../ui/React/WorldMap";
|
||||
|
Reference in New Issue
Block a user