mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { Player } from "@player";
|
||||
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
||||
import { CityName } from "../Locations/data/CityNames";
|
||||
import { CityName } from "../Enums";
|
||||
import { findCrime } from "../Crime/CrimeHelpers";
|
||||
import { Augmentation } from "../Augmentation/Augmentation";
|
||||
|
||||
import { Sleeve } from "../ScriptEditor/NetscriptDefinitions";
|
||||
import { Sleeve } from "@nsdefs";
|
||||
import { checkEnum } from "../utils/helpers/enum";
|
||||
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
|
||||
import { InternalAPI, NetscriptContext, removedFunction } from "../Netscript/APIWrapper";
|
||||
import { isSleeveBladeburnerWork } from "../PersonObjects/Sleeve/Work/SleeveBladeburnerWork";
|
||||
import { isSleeveFactionWork } from "../PersonObjects/Sleeve/Work/SleeveFactionWork";
|
||||
import { isSleeveCompanyWork } from "../PersonObjects/Sleeve/Work/SleeveCompanyWork";
|
||||
@@ -31,7 +31,7 @@ export function NetscriptSleeve(): InternalAPI<Sleeve> {
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
const sleeveFunctions: InternalAPI<Sleeve> = {
|
||||
getNumSleeves: (ctx) => () => {
|
||||
checkSleeveAPIAccess(ctx);
|
||||
return Player.sleeves.length;
|
||||
@@ -254,4 +254,11 @@ export function NetscriptSleeve(): InternalAPI<Sleeve> {
|
||||
return Player.sleeves[sleeveNumber].bladeburner(action, contract);
|
||||
},
|
||||
};
|
||||
// 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"),
|
||||
});
|
||||
return sleeveFunctions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user