mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 00:04:22 +02:00
This reverts commit 7a3c18fcf2.
This commit is contained in:
@@ -94,8 +94,8 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
}
|
||||
|
||||
function getResearchCost(division: Division, researchName: CorpResearchName): number {
|
||||
const researchTree = IndustryResearchTrees[division.industry];
|
||||
if (researchTree === undefined) throw new Error(`No research tree for industry '${division.industry}'`);
|
||||
const researchTree = IndustryResearchTrees[division.type];
|
||||
if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);
|
||||
const allResearch = researchTree.getAllNodes();
|
||||
if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);
|
||||
const research = ResearchMap[researchName];
|
||||
@@ -157,9 +157,9 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
function getSafeDivision(division: Division): NSDivision {
|
||||
const cities = getRecordKeys(division.offices);
|
||||
|
||||
const data = {
|
||||
return {
|
||||
name: division.name,
|
||||
industry: division.industry,
|
||||
type: division.type,
|
||||
awareness: division.awareness,
|
||||
popularity: division.popularity,
|
||||
productionMult: division.productionMult,
|
||||
@@ -174,14 +174,6 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
makesProducts: division.makesProducts,
|
||||
maxProducts: division.maxProducts,
|
||||
};
|
||||
setDeprecatedProperties(data, {
|
||||
type: {
|
||||
identifier: "ns.corporation.getDivision().type",
|
||||
message: "Use ns.corporation.getDivision().industry instead.",
|
||||
value: data.industry,
|
||||
},
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
const warehouseAPI: InternalAPI<WarehouseAPI> = {
|
||||
|
||||
Reference in New Issue
Block a user