few more bug fixes

This commit is contained in:
Olivier Gagnon 2021-09-07 17:18:02 -04:00
parent 7bc0764d5d
commit 0d5a302580
5 changed files with 83 additions and 32 deletions

File diff suppressed because one or more lines are too long

18
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -76,15 +76,15 @@ List of Factions and their Requirements
+---------------------+----------------+-----------------------------------------+-------------------------------+ +---------------------+----------------+-----------------------------------------+-------------------------------+
| Hacking | NiteSec | * Install a backdoor on the avmnite-02h | | | Hacking | NiteSec | * Install a backdoor on the avmnite-02h | |
| Groups | | server | | | Groups | | server | |
| | | * Home Computer RAM of at least 32GB | | | | | | |
+ +----------------+-----------------------------------------+-------------------------------+ + +----------------+-----------------------------------------+-------------------------------+
| | The Black Hand | * Install a backdoor on the I.I.I.I | | | | The Black Hand | * Install a backdoor on the I.I.I.I | |
| | | server | | | | | server | |
| | | * Home Computer RAM of at least 64GB | | | | | | |
+ +----------------+-----------------------------------------+-------------------------------+ + +----------------+-----------------------------------------+-------------------------------+
| | Bitrunners | * Install a backdoor on the run4theh111z| | | | Bitrunners | * Install a backdoor on the run4theh111z| |
| | | server | | | | | server | |
| | | * Home Computer RAM of at least 128GB | | | | | | |
+---------------------+----------------+-----------------------------------------+-------------------------------+ +---------------------+----------------+-----------------------------------------+-------------------------------+
| Megacorporations | ECorp | * Have 200k reputation with | | | Megacorporations | ECorp | * Have 200k reputation with | |
| | | the Corporation | | | | | the Corporation | |

@ -155,14 +155,17 @@ function ProductComponent(props: IProductProps): React.ReactElement {
// Unfinished Product // Unfinished Product
if (!product.fin) { if (!product.fin) {
if (hasUpgradeDashboard) {
return ( return (
<div className={"cmpy-mgmt-warehouse-product-div"}> <div className={"cmpy-mgmt-warehouse-product-div"}>
<p>Designing {product.name}...</p> <p>
Designing {product.name} (req. Operations/Engineers in{" "}
{product.createCity})...
</p>
<br /> <br />
<p>{numeralWrapper.format(product.prog, "0.00")}% complete</p> <p>{numeralWrapper.format(product.prog, "0.00")}% complete</p>
<br /> <br />
{hasUpgradeDashboard && (
<div> <div>
<button className={"std-button"} onClick={openSellProductPopup}> <button className={"std-button"} onClick={openSellProductPopup}>
{sellButtonText} {sellButtonText}
@ -189,17 +192,9 @@ function ProductComponent(props: IProductProps): React.ReactElement {
</button> </button>
)} )}
</div> </div>
)}
</div> </div>
); );
} else {
return (
<div className={"cmpy-mgmt-warehouse-product-div"}>
<p>Designing {product.name}...</p>
<br />
<p>{numeralWrapper.format(product.prog, "0.00")}% complete</p>
</div>
);
}
} }
return ( return (

@ -13,6 +13,32 @@ import { GangMember } from "../GangMember";
import { Gang } from "../Gang"; import { Gang } from "../Gang";
import { UpgradeType } from "../data/upgrades"; import { UpgradeType } from "../data/upgrades";
interface INextRevealProps {
gang: Gang;
upgrades: string[];
type: UpgradeType;
player: IPlayer;
}
function NextReveal(props: INextRevealProps): React.ReactElement {
const upgrades = Object.keys(GangMemberUpgrades)
.filter((upgName: string) => {
const upg = GangMemberUpgrades[upgName];
if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;
if (upg.type !== props.type) return false;
if (props.upgrades.includes(upgName)) return false;
return true;
})
.map((upgName: string) => GangMemberUpgrades[upgName]);
if (upgrades.length === 0) return <></>;
return (
<p>
Next at <Money money={upgrades[0].cost} />
</p>
);
}
interface IPanelProps { interface IPanelProps {
member: GangMember; member: GangMember;
gang: Gang; gang: Gang;
@ -137,6 +163,12 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
> >
<h2>Weapons</h2> <h2>Weapons</h2>
{weaponUpgrades.map((upg) => upgradeButton(upg))} {weaponUpgrades.map((upg) => upgradeButton(upg))}
<NextReveal
gang={props.gang}
type={UpgradeType.Weapon}
player={props.player}
upgrades={props.member.upgrades}
/>
</div> </div>
<div <div
className="noselect" className="noselect"
@ -144,6 +176,12 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
> >
<h2>Armor</h2> <h2>Armor</h2>
{armorUpgrades.map((upg) => upgradeButton(upg))} {armorUpgrades.map((upg) => upgradeButton(upg))}
<NextReveal
gang={props.gang}
type={UpgradeType.Armor}
player={props.player}
upgrades={props.member.upgrades}
/>
</div> </div>
<div <div
className="noselect" className="noselect"
@ -151,6 +189,12 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
> >
<h2>Vehicles</h2> <h2>Vehicles</h2>
{vehicleUpgrades.map((upg) => upgradeButton(upg))} {vehicleUpgrades.map((upg) => upgradeButton(upg))}
<NextReveal
gang={props.gang}
type={UpgradeType.Vehicle}
player={props.player}
upgrades={props.member.upgrades}
/>
</div> </div>
<div <div
className="noselect" className="noselect"
@ -158,6 +202,12 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
> >
<h2>Rootkits</h2> <h2>Rootkits</h2>
{rootkitUpgrades.map((upg) => upgradeButton(upg, true))} {rootkitUpgrades.map((upg) => upgradeButton(upg, true))}
<NextReveal
gang={props.gang}
type={UpgradeType.Rootkit}
player={props.player}
upgrades={props.member.upgrades}
/>
</div> </div>
<div <div
className="noselect" className="noselect"
@ -165,6 +215,12 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
> >
<h2>Augmentations</h2> <h2>Augmentations</h2>
{augUpgrades.map((upg) => upgradeButton(upg, true))} {augUpgrades.map((upg) => upgradeButton(upg, true))}
<NextReveal
gang={props.gang}
type={UpgradeType.Augmentation}
player={props.player}
upgrades={props.member.upgrades}
/>
</div> </div>
</div> </div>
); );