mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
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:
commit
fc7eb72fc0
@ -455,6 +455,7 @@ export function Research(division: IIndustry, researchName: string): void {
|
|||||||
if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);
|
if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);
|
||||||
const research = ResearchMap[researchName];
|
const research = ResearchMap[researchName];
|
||||||
|
|
||||||
|
if (division.researched[researchName]) return;
|
||||||
if (division.sciResearch.qty < research.cost)
|
if (division.sciResearch.qty < research.cost)
|
||||||
throw new Error(`You do not have enough Scientific Research for ${research.name}`);
|
throw new Error(`You do not have enough Scientific Research for ${research.name}`);
|
||||||
division.sciResearch.qty -= research.cost;
|
division.sciResearch.qty -= research.cost;
|
||||||
|
Loading…
Reference in New Issue
Block a user