mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 17:53:00 +02:00
merge dev
This commit is contained in:
@@ -281,26 +281,28 @@ export function NetscriptBladeburner(player: IPlayer, workerScript: WorkerScript
|
||||
},
|
||||
getSkillUpgradeCost:
|
||||
(ctx: NetscriptContext) =>
|
||||
(_skillName: unknown): number => {
|
||||
(_skillName: unknown, _count: unknown = 1): number => {
|
||||
const skillName = ctx.helper.string("skillName", _skillName);
|
||||
const count = ctx.helper.number("count", _count);
|
||||
checkBladeburnerAccess(ctx);
|
||||
const bladeburner = player.bladeburner;
|
||||
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
||||
try {
|
||||
return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);
|
||||
return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, count, workerScript);
|
||||
} catch (e: unknown) {
|
||||
throw ctx.makeRuntimeErrorMsg(String(e));
|
||||
}
|
||||
},
|
||||
upgradeSkill:
|
||||
(ctx: NetscriptContext) =>
|
||||
(_skillName: unknown): boolean => {
|
||||
(_skillName: unknown, _count: unknown = 1): boolean => {
|
||||
const skillName = ctx.helper.string("skillName", _skillName);
|
||||
const count = ctx.helper.number("count", _count);
|
||||
checkBladeburnerAccess(ctx);
|
||||
const bladeburner = player.bladeburner;
|
||||
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
|
||||
try {
|
||||
return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
|
||||
return bladeburner.upgradeSkillNetscriptFn(skillName, count, workerScript);
|
||||
} catch (e: unknown) {
|
||||
throw ctx.makeRuntimeErrorMsg(String(e));
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export function NetscriptInfiltration(player: IPlayer): InternalAPI<IInfiltratio
|
||||
};
|
||||
return {
|
||||
getPossibleLocations: () => (): string[] => {
|
||||
return getLocationsWithInfiltrations.map((l) => l + "");
|
||||
return getLocationsWithInfiltrations.map((l) => l.name);
|
||||
},
|
||||
getInfiltration:
|
||||
(ctx: NetscriptContext) =>
|
||||
|
||||
Reference in New Issue
Block a user