2021-09-05 01:09:30 +02:00
|
|
|
import React from "react";
|
2021-08-30 09:07:14 +02:00
|
|
|
import { ResearchTree } from "./ResearchTree";
|
2021-09-07 08:03:39 +02:00
|
|
|
import { ICorporation } from "./ICorporation";
|
2021-09-09 05:47:34 +02:00
|
|
|
import { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from "./data/BaseResearchTree";
|
2021-09-07 08:03:39 +02:00
|
|
|
import { MoneyCost } from "./ui/MoneyCost";
|
2021-08-30 09:07:14 +02:00
|
|
|
|
|
|
|
interface IIndustryMap<T> {
|
2021-09-05 01:09:30 +02:00
|
|
|
[key: string]: T | undefined;
|
|
|
|
Energy: T;
|
|
|
|
Utilities: T;
|
|
|
|
Agriculture: T;
|
|
|
|
Fishing: T;
|
|
|
|
Mining: T;
|
|
|
|
Food: T;
|
|
|
|
Tobacco: T;
|
|
|
|
Chemical: T;
|
|
|
|
Pharmaceutical: T;
|
|
|
|
Computer: T;
|
|
|
|
Robotics: T;
|
|
|
|
Software: T;
|
|
|
|
Healthcare: T;
|
|
|
|
RealEstate: T;
|
2021-08-30 09:07:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Map of official names for each Industry
|
|
|
|
export const Industries: IIndustryMap<string> = {
|
2021-09-05 01:09:30 +02:00
|
|
|
Energy: "Energy",
|
|
|
|
Utilities: "Water Utilities",
|
|
|
|
Agriculture: "Agriculture",
|
|
|
|
Fishing: "Fishing",
|
|
|
|
Mining: "Mining",
|
|
|
|
Food: "Food",
|
|
|
|
Tobacco: "Tobacco",
|
|
|
|
Chemical: "Chemical",
|
|
|
|
Pharmaceutical: "Pharmaceutical",
|
|
|
|
Computer: "Computer Hardware",
|
|
|
|
Robotics: "Robotics",
|
|
|
|
Software: "Software",
|
|
|
|
Healthcare: "Healthcare",
|
|
|
|
RealEstate: "RealEstate",
|
|
|
|
};
|
2021-08-30 09:07:14 +02:00
|
|
|
|
|
|
|
// Map of how much money it takes to start each industry
|
|
|
|
export const IndustryStartingCosts: IIndustryMap<number> = {
|
2021-09-05 01:09:30 +02:00
|
|
|
Energy: 225e9,
|
|
|
|
Utilities: 150e9,
|
|
|
|
Agriculture: 40e9,
|
|
|
|
Fishing: 80e9,
|
|
|
|
Mining: 300e9,
|
|
|
|
Food: 10e9,
|
|
|
|
Tobacco: 20e9,
|
|
|
|
Chemical: 70e9,
|
|
|
|
Pharmaceutical: 200e9,
|
|
|
|
Computer: 500e9,
|
|
|
|
Robotics: 1e12,
|
|
|
|
Software: 25e9,
|
|
|
|
Healthcare: 750e9,
|
|
|
|
RealEstate: 600e9,
|
|
|
|
};
|
2021-08-30 09:07:14 +02:00
|
|
|
|
|
|
|
// Map of description for each industry
|
2021-09-09 05:47:34 +02:00
|
|
|
export const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {
|
2021-09-07 08:03:39 +02:00
|
|
|
Energy: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Engage in the production and distribution of energy.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Energy} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Utilities: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Distribute water and provide wastewater services.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Utilities} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Agriculture: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Cultivate crops and breed livestock to produce food.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Agriculture} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: YES
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Fishing: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
2021-09-09 05:47:34 +02:00
|
|
|
Produce food through the breeding and processing of fish and fish products.
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Fishing} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Mining: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Extract and process metals from the earth.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Mining} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Food: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Create your own restaurants all around the world.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Food} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: YES
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Tobacco: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Create and distribute tobacco and tobacco-related products.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Tobacco} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: YES
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Chemical: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Produce industrial chemicals.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Chemical} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Pharmaceutical: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Discover, develop, and create new pharmaceutical drugs.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Pharmaceutical} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Computer: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
2021-09-09 05:47:34 +02:00
|
|
|
Develop and manufacture new computer hardware and networking infrastructures.
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Computer} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Robotics: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Develop and create robots.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Robotics} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Software: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Develop computer software and create AI Cores.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Software} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: YES
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
Healthcare: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Create and manage hospitals.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.Healthcare} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
2021-09-07 08:03:39 +02:00
|
|
|
RealEstate: (corp: ICorporation) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<>
|
|
|
|
Develop and manage real estate properties.
|
|
|
|
<br />
|
|
|
|
<br />
|
2021-09-09 05:47:34 +02:00
|
|
|
Starting cost: <MoneyCost money={IndustryStartingCosts.RealEstate} corp={corp} />
|
2021-09-05 01:09:30 +02:00
|
|
|
<br />
|
|
|
|
Recommended starting Industry: NO
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
};
|
2021-08-30 09:07:14 +02:00
|
|
|
|
|
|
|
// Map of available Research for each Industry. This data is held in a
|
|
|
|
// ResearchTree object
|
|
|
|
export const IndustryResearchTrees: IIndustryMap<ResearchTree> = {
|
2021-09-05 01:09:30 +02:00
|
|
|
Energy: getBaseResearchTreeCopy(),
|
|
|
|
Utilities: getBaseResearchTreeCopy(),
|
|
|
|
Agriculture: getBaseResearchTreeCopy(),
|
|
|
|
Fishing: getBaseResearchTreeCopy(),
|
|
|
|
Mining: getBaseResearchTreeCopy(),
|
|
|
|
Food: getProductIndustryResearchTreeCopy(),
|
|
|
|
Tobacco: getProductIndustryResearchTreeCopy(),
|
|
|
|
Chemical: getBaseResearchTreeCopy(),
|
|
|
|
Pharmaceutical: getProductIndustryResearchTreeCopy(),
|
|
|
|
Computer: getProductIndustryResearchTreeCopy(),
|
|
|
|
Robotics: getProductIndustryResearchTreeCopy(),
|
|
|
|
Software: getProductIndustryResearchTreeCopy(),
|
|
|
|
Healthcare: getProductIndustryResearchTreeCopy(),
|
|
|
|
RealEstate: getProductIndustryResearchTreeCopy(),
|
|
|
|
};
|
2021-08-30 09:07:14 +02:00
|
|
|
|
|
|
|
export function resetIndustryResearchTrees(): void {
|
2021-09-05 01:09:30 +02:00
|
|
|
IndustryResearchTrees.Energy = getBaseResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Mining = getBaseResearchTreeCopy();
|
2022-02-05 02:29:53 +01:00
|
|
|
IndustryResearchTrees.Food = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Tobacco = getProductIndustryResearchTreeCopy();
|
2021-09-05 01:09:30 +02:00
|
|
|
IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();
|
2022-02-05 02:29:53 +01:00
|
|
|
IndustryResearchTrees.Pharmaceutical = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Computer = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Robotics = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Software = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.Healthcare = getProductIndustryResearchTreeCopy();
|
|
|
|
IndustryResearchTrees.RealEstate = getProductIndustryResearchTreeCopy();
|
2021-08-30 09:07:14 +02:00
|
|
|
}
|