2021-06-18 22:22:12 +02:00
|
|
|
import React, { useState, useEffect } from "react";
|
|
|
|
import {
|
|
|
|
formatNumber,
|
|
|
|
convertTimeMsToTimeElapsedString,
|
|
|
|
} from "../../../utils/StringHelperFunctions";
|
|
|
|
import { OperationElem } from "./OperationElem";
|
|
|
|
import { Operation } from "../Operation";
|
2021-08-16 04:35:43 +02:00
|
|
|
import { IBladeburner } from "../IBladeburner";
|
2021-08-16 07:35:05 +02:00
|
|
|
import { IPlayer } from "../../PersonObjects/IPlayer";
|
2021-06-18 22:22:12 +02:00
|
|
|
|
|
|
|
interface IProps {
|
2021-08-16 04:35:43 +02:00
|
|
|
bladeburner: IBladeburner;
|
2021-08-16 07:35:05 +02:00
|
|
|
player: IPlayer;
|
2021-06-18 22:22:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function OperationList(props: IProps): React.ReactElement {
|
|
|
|
const names = Object.keys(props.bladeburner.operations);
|
|
|
|
const operations = props.bladeburner.operations;
|
|
|
|
return (<>
|
2021-08-16 03:49:08 +02:00
|
|
|
{names.map((name: string) => <li key={name} className="bladeburner-action">
|
2021-08-16 07:35:05 +02:00
|
|
|
<OperationElem bladeburner={props.bladeburner} action={operations[name]} player={props.player} />
|
2021-08-16 03:49:08 +02:00
|
|
|
</li>,
|
2021-06-18 22:22:12 +02:00
|
|
|
)}
|
|
|
|
</>);
|
|
|
|
}
|