From 016dbe67d9d42f5e21382995d10658904c679059 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:46:18 +0800 Subject: [PATCH] add an early out if already researched hotfix/3977 File List: src/Corporation/Actions.ts --- src/Corporation/Actions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Corporation/Actions.ts b/src/Corporation/Actions.ts index 55c6b646f..fbcad46f3 100644 --- a/src/Corporation/Actions.ts +++ b/src/Corporation/Actions.ts @@ -455,6 +455,7 @@ export function Research(division: IIndustry, researchName: string): void { if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`); const research = ResearchMap[researchName]; + if (division.researched[researchName]) return; if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`); division.sciResearch.qty -= research.cost;