mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 02:03:01 +02:00
2.2
This commit is contained in:
@@ -866,19 +866,23 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
return Math.round(getCorporation().storedCycles / 5) * 1000;
|
||||
},
|
||||
};
|
||||
// TODO: More removedFunctions entries for old getter functions replaced by getConstants
|
||||
|
||||
// TODO 3.0: Remove these removedFunctions warnings.
|
||||
Object.assign(corpFunctions, {
|
||||
assignJob: removedFunction(
|
||||
"v2.2.0",
|
||||
"Corporation employees no longer exist as separate objects.\nUse corporation.setAutoJobAssignment instead to assign employees to jobs.",
|
||||
"Removed due to employees no longer being objects. Use ns.corporation.setAutoJobAssignment instead.",
|
||||
true,
|
||||
),
|
||||
getEmployee: removedFunction(
|
||||
"v2.2.0",
|
||||
"Corporation employees no longer exist as separate objects and this function no longer has a use.",
|
||||
true,
|
||||
),
|
||||
getDivisionConstants: removedFunction("v2.2.0", "ns.corporation.getIndustryData"),
|
||||
getEmployee: removedFunction("v2.2.0", "Removed due to employees no longer being individual objects.", true),
|
||||
getExpandCityCost: removedFunction("v2.2.0", "corporation.getConstants().officeInitialCost"),
|
||||
getExpandIndustryCost: removedFunction("v2.2.0", "corporation.getIndustryData"),
|
||||
getIndustryTypes: removedFunction("v2.2.0", "corporation.getConstants().industryNames"),
|
||||
getMaterialNames: removedFunction("v2.2.0", "corporation.getConstants().materialNames"),
|
||||
getPurchaseWarehouseCost: removedFunction("v2.2.0", "corporation.getConstants().warehouseInitialCost"),
|
||||
getResearchNames: removedFunction("v2.2.0", "corporation.getConstants().researchNames"),
|
||||
getUnlockables: removedFunction("v2.2.0", "corporation.getConstants().unlockNames"),
|
||||
getUpgradeNames: removedFunction("v2.2.0", "corporation.getConstants().upgradeNames"),
|
||||
});
|
||||
return corpFunctions;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import { calculateHackingTime } from "../Hacking";
|
||||
import { Server } from "../Server/Server";
|
||||
import { netscriptCanHack } from "../Hacking/netscriptCanHack";
|
||||
import { FactionInfos } from "../Faction/FactionInfo";
|
||||
import { InternalAPI, NetscriptContext } from "src/Netscript/APIWrapper";
|
||||
import { InternalAPI, NetscriptContext, removedFunction } from "../Netscript/APIWrapper";
|
||||
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
||||
import { enterBitNode } from "../RedPill";
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
@@ -91,7 +91,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
const singularityAPI: InternalAPI<ISingularity> = {
|
||||
getOwnedAugmentations: (ctx) => (_purchased) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const purchased = !!_purchased;
|
||||
@@ -118,13 +118,6 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
|
||||
return getFactionAugmentationsFiltered(faction);
|
||||
},
|
||||
getAugmentationCost: (ctx) => (_augName) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const augName = helpers.string(ctx, "augName", _augName);
|
||||
const aug = getAugmentation(ctx, augName);
|
||||
const costs = aug.getCost();
|
||||
return [costs.repCost, costs.moneyCost];
|
||||
},
|
||||
getAugmentationPrereq: (ctx) => (_augName) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const augName = helpers.string(ctx, "augName", _augName);
|
||||
@@ -1221,4 +1214,11 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
return canGetBonus();
|
||||
},
|
||||
};
|
||||
Object.assign(singularityAPI, {
|
||||
getAugmentationCost: removedFunction(
|
||||
"v2.2.0",
|
||||
"singularity.getAugmentationPrice and singularity.getAugmentationRepReq",
|
||||
),
|
||||
});
|
||||
return singularityAPI;
|
||||
}
|
||||
|
||||
@@ -258,8 +258,8 @@ export function NetscriptSleeve(): InternalAPI<Sleeve> {
|
||||
// Removed undocumented functions added using Object.assign because typescript.
|
||||
// TODO: Remove these at 3.0
|
||||
Object.assign(sleeveFunctions, {
|
||||
getSleeveStats: removedFunction("2.2.0", "sleeve.getSleeve"),
|
||||
getSleeveInformation: removedFunction("2.2.0", "sleeve.getSleeve"),
|
||||
getSleeveStats: removedFunction("v2.2.0", "sleeve.getSleeve"),
|
||||
getInformation: removedFunction("v2.2.0", "sleeve.getSleeve"),
|
||||
});
|
||||
return sleeveFunctions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user