2021-08-19 07:45:26 +02:00
|
|
|
import React from "react";
|
2021-06-18 22:22:12 +02:00
|
|
|
import { GeneralActionElem } from "./GeneralActionElem";
|
|
|
|
import { Action } from "../Action";
|
|
|
|
import { GeneralActions } from "../GeneralActions";
|
2022-09-20 08:15:58 +02:00
|
|
|
import { Bladeburner } from "../Bladeburner";
|
2021-06-18 22:22:12 +02:00
|
|
|
|
|
|
|
interface IProps {
|
2022-09-20 08:15:58 +02:00
|
|
|
bladeburner: Bladeburner;
|
2021-06-18 22:22:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function GeneralActionList(props: IProps): React.ReactElement {
|
2021-09-05 01:09:30 +02:00
|
|
|
const actions: Action[] = [];
|
2022-01-16 01:45:03 +01:00
|
|
|
for (const name of Object.keys(GeneralActions)) {
|
2023-05-05 09:55:59 +02:00
|
|
|
if (Object.hasOwn(GeneralActions, name)) {
|
2021-09-05 01:09:30 +02:00
|
|
|
actions.push(GeneralActions[name]);
|
2021-06-18 22:22:12 +02:00
|
|
|
}
|
2021-09-05 01:09:30 +02:00
|
|
|
}
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{actions.map((action: Action) => (
|
2022-09-06 15:07:12 +02:00
|
|
|
<GeneralActionElem key={action.name} bladeburner={props.bladeburner} action={action} />
|
2021-09-05 01:09:30 +02:00
|
|
|
))}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|