merge dev

This commit is contained in:
Olivier Gagnon
2022-07-20 12:16:42 -04:00
47 changed files with 223 additions and 120 deletions
+6 -4
View File
@@ -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));
}
+1 -1
View File
@@ -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) =>