CORPORATION: Corp changes prior to 2.3 finalization (#503)

This commit is contained in:
Snarling
2023-05-15 18:06:57 -04:00
committed by GitHub
parent e2e9b084bc
commit 2ae3ac52f1
135 changed files with 3106 additions and 3582 deletions
+4 -7
View File
@@ -1,16 +1,13 @@
// Defines the ResearchTree that is common to all Corporation Industries
// i.e. all Industries have these types of Research available to unlock
import { CorpResearchName } from "@nsdefs";
import { Research } from "../Research";
import { ResearchMap } from "../ResearchMap";
import { ResearchTree, Node } from "../ResearchTree";
function makeNode(name: string): Node {
const research: Research | null = ResearchMap[name];
if (research == null) {
throw new Error(`Invalid research name: ${name}`);
}
return new Node({ text: research.name, cost: research.cost });
function makeNode(name: CorpResearchName): Node {
const research: Research = ResearchMap[name];
return new Node({ researchName: research.name, cost: research.cost });
}
// Creates the Nodes for the BaseResearchTree.