some comments

This commit is contained in:
Olivier Gagnon 2021-06-17 17:47:45 -04:00
parent 97fdf7cb7f
commit 31cf02e8e4
15 changed files with 57 additions and 6 deletions

@ -1,3 +1,7 @@
/**
* React Component for the content of the popup before the player confirms the
* ascension of a gang member.
*/
import React from "react";
import { Gang } from "../Gang";
import { GangMember } from "../GangMember";

@ -1,3 +1,6 @@
/**
* React Component for displaying the bonus time remaining.
*/
import * as React from "react";
import { Gang } from "../Gang";
import { CONSTANTS } from "../../Constants";

@ -1,3 +1,6 @@
/**
* React Component for a gang member on the management subpage.
*/
import React from "react";
import { Gang } from "../Gang";
import { GangMember } from "../GangMember";

@ -1,3 +1,7 @@
/**
* React Component for the content of the accordion of gang members on the
* management subpage.
*/
import React, { useState } from "react";
import { GangMemberStats } from "./GangMemberStats";
import { TaskSelector } from "./TaskSelector";

@ -1,3 +1,6 @@
/**
* React Component for the list of gang members on the management subpage.
*/
import React, { useState } from "react";
import { GangMemberUpgradePopup } from "./GangMemberUpgradePopup";
import { GangMemberAccordion } from "./GangMemberAccordion";
@ -25,7 +28,7 @@ export function GangMemberList(props: IProps): React.ReactElement {
});
}
function onChange(event: React.ChangeEvent<HTMLInputElement>): void {
function onFilterChange(event: React.ChangeEvent<HTMLInputElement>): void {
setFilter(event.target.value);
}
@ -42,7 +45,7 @@ export function GangMemberList(props: IProps): React.ReactElement {
placeholder="Filter gang member"
style={{margin: "5px", padding: "5px"}}
value={filter}
onChange={onChange} />
onChange={onFilterChange} />
<a
className="a-link-button"
style={{display: 'inline-block'}}

@ -1,3 +1,7 @@
/**
* React Component for the first part of a gang member details.
* Contains skills and exp.
*/
import React from "react";
import { dialogBoxCreate } from "../../../utils/DialogBox";
import { formatNumber } from "../../../utils/StringHelperFunctions";
@ -46,7 +50,7 @@ Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * props.member.dex_a
Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * props.member.agi_asc_mult)}(x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(props.member.agi_asc_mult)} Asc)<br />
Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * props.member.cha_asc_mult)}(x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(props.member.cha_asc_mult)} Asc)
</span>
<pre id={`${props.member.name}gang-member-stats-text`}>
<pre>
Hacking: {formatNumber(props.member.hack, 0)} ({numeralWrapper.formatExp(props.member.hack_exp)} exp)<br />
Strength: {formatNumber(props.member.str, 0)} ({numeralWrapper.formatExp(props.member.str_exp)} exp)<br />
Defense: {formatNumber(props.member.def, 0)} ({numeralWrapper.formatExp(props.member.def_exp)} exp)<br />

@ -1,3 +1,6 @@
/**
* React Component for the popup that manages gang members upgrades
*/
import React, { useState, useEffect } from "react";
import { formatNumber } from "../../../utils/StringHelperFunctions";
import { numeralWrapper } from "../../ui/numeralFormat";
@ -34,7 +37,7 @@ function GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {
const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);
const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);
function purchased(upgName: string): React.ReactElement {
function purchasedUpgrade(upgName: string): React.ReactElement {
const upg = GangMemberUpgrades[upgName]
return (<div key={upgName} className="gang-owned-upgrade tooltip">
{upg.name}
@ -64,8 +67,8 @@ Agi: {props.member.agi} (x{formatNumber(props.member.agi_mult * props.member.ag
Cha: {props.member.cha} (x{formatNumber(props.member.cha_mult * props.member.cha_asc_mult, 2)})
</pre>
<div className="gang-owned-upgrades-div">
Purchased Upgrades: {props.member.upgrades.map((upg: string) => purchased(upg))}
{props.member.augmentations.map((upg: string) => purchased(upg))}
Purchased Upgrades: {props.member.upgrades.map((upg: string) => purchasedUpgrade(upg))}
{props.member.augmentations.map((upg: string) => purchasedUpgrade(upg))}
</div>
<div style={{width: "20%", display: "inline-block"}}>
<h2>Weapons</h2>

@ -1,3 +1,7 @@
/**
* React Component for the stats related to the gang, like total respect and
* money per second.
*/
import React from "react";
import { Factions } from "../../Faction/Factions";
import { Gang } from "../Gang";

@ -1,3 +1,6 @@
/**
* React Component for the subpage that manages gang members, the main page.
*/
import React from "react";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { GangStats } from "./GangStats";

@ -1,3 +1,6 @@
/**
* React Component for the recruitment button and text on the gang main page.
*/
import React from "react";
import { Gang } from "../Gang";
import { RecruitPopup } from "./RecruitPopup";

@ -1,3 +1,6 @@
/**
* React Component for the popup used to recruit new gang members.
*/
import React, { useState } from "react";
import { Gang } from "../Gang";
import { removePopup } from "../../ui/React/createPopup";

@ -1,3 +1,6 @@
/**
* React Component for all the gang stuff.
*/
import React, { useState, useEffect } from "react";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { ManagementSubpage } from "./ManagementSubpage";

@ -1,3 +1,7 @@
/**
* React Component for left side of the gang member accordion, contains the
* description of the task that member is currently doing.
*/
import React from "react";
import { GangMemberTasks } from "../GangMemberTasks";
import { GangMember } from "../GangMember";

@ -1,3 +1,7 @@
/**
* React Component for the middle part of the gang member accordion. Contains
* the task selector as well as some stats.
*/
import React, { useState } from "react";
import { numeralWrapper } from "../../ui/numeralFormat";
import { StatsTable } from "../../ui/React/StatsTable";

@ -1,3 +1,6 @@
/**
* React Component for the territory subpage.
*/
import React from "react";
import { numeralWrapper } from "../../ui/numeralFormat";
import { dialogBoxCreate } from "../../../utils/DialogBox";