diff --git a/src/Faction/FactionInfo.tsx b/src/Faction/FactionInfo.tsx index 24f5ddb8d..42387fc90 100644 --- a/src/Faction/FactionInfo.tsx +++ b/src/Faction/FactionInfo.tsx @@ -1,6 +1,8 @@ import React from "react"; import { IMap } from "../types"; import { FactionNames } from "./data/FactionNames"; +import { use } from "../ui/Context"; +import { Option } from "./ui/Option"; interface FactionInfoParams { infoText?: JSX.Element; @@ -10,6 +12,7 @@ interface FactionInfoParams { offerSecurityWork?: boolean; special?: boolean; keepOnInstall?: boolean; + assignment?: () => React.ReactElement; } /** @@ -51,6 +54,11 @@ export class FactionInfo { */ special: boolean; + /** + * The data to display on the faction screen. + */ + assignment?: () => React.ReactElement; + constructor(params: FactionInfoParams) { this.infoText = params.infoText ?? <>; this.enemies = params.enemies ?? []; @@ -60,6 +68,7 @@ export class FactionInfo { this.keep = params.keepOnInstall ?? false; this.special = params.special ?? false; + this.assignment = params.assignment; } offersWork(): boolean { @@ -438,11 +447,21 @@ export const FactionInfos: IMap = { ), special: true, + assignment: (): React.ReactElement => { + const router = use.Router(); + return ( +