diff --git a/src/Corporation/Actions.ts b/src/Corporation/Actions.ts index e69d5bd72..9a510e67d 100644 --- a/src/Corporation/Actions.ts +++ b/src/Corporation/Actions.ts @@ -16,6 +16,9 @@ import { IndustryUpgrades } from "./IndustryUpgrades"; import { ResearchMap } from "./ResearchMap"; export function NewIndustry(corporation: ICorporation, industry: string, name: string): void { + if (corporation.divisions.find(({ type }) => industry == type)) + throw new Error("You have already expanded into this industry!"); + for (let i = 0; i < corporation.divisions.length; ++i) { if (corporation.divisions[i].name === name) { throw new Error("This division name is already in use!");