Merge pull request #3980 from phyzical/hotfix/3977

CORP FIX: dont take research points for something already researched via api
This commit is contained in:
hydroflame 2022-08-23 12:11:15 -03:00 committed by GitHub
commit fc7eb72fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;