mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
TYPESAFETY: FactionName (#644)
This commit is contained in:
@@ -7,7 +7,7 @@ import { Typography } from "@mui/material";
|
||||
|
||||
interface FactionInfoParams {
|
||||
infoText?: JSX.Element;
|
||||
enemies?: string[];
|
||||
enemies?: FactionName[];
|
||||
offerHackingWork?: boolean;
|
||||
offerFieldWork?: boolean;
|
||||
offerSecurityWork?: boolean;
|
||||
@@ -19,7 +19,7 @@ interface FactionInfoParams {
|
||||
/** Contains the "information" property for all the Factions, which is just a description of each faction */
|
||||
export class FactionInfo {
|
||||
/** The names of all other factions considered to be enemies to this faction. */
|
||||
enemies: string[];
|
||||
enemies: FactionName[];
|
||||
|
||||
/** The descriptive text to show on the faction's page. */
|
||||
infoText: JSX.Element;
|
||||
@@ -60,7 +60,7 @@ export class FactionInfo {
|
||||
}
|
||||
|
||||
/** A map of all factions and associated info to them. */
|
||||
export const FactionInfos: Record<string, FactionInfo> = {
|
||||
export const FactionInfos: Record<FactionName, FactionInfo> = {
|
||||
// Endgame
|
||||
[FactionName.Illuminati]: new FactionInfo({
|
||||
infoText: (
|
||||
|
||||
Reference in New Issue
Block a user